Giter Site home page Giter Site logo

Comments (7)

wouterrutgers avatar wouterrutgers commented on August 25, 2024 3

This isn't an issue with memory. php -r "escapeshellarg(str_repeat('a', 8000));" doesn't throw any exceptions but php -r "escapeshellarg(str_repeat('a', 9000));" does, regardless of the memory limit. Mine is set to 4gb.

A possible solution would be to check whether the $this->rawRequest exceeds 8000 characters and just return an empty string in getRequestAsCurl() if that's the case.

I wanted to try this for Github webhooks, but their payloads exceed the 8000 characters, unfortunately.

from expose.

dinamic avatar dinamic commented on August 25, 2024 2

Guys, this is still not working properly on mac OS. It does not seem to be affected by the memory limit setting.

~/.expose/config.php:

    'memory_limit' => '1024M',

Where's this limitation coming from? I don't understand.

In CurlFormatter.php line 137:

  escapeshellarg(): Argument exceeds the allowed length of 262144 bytes

@mpociot what's your take on this?

from expose.

mpociot avatar mpociot commented on August 25, 2024 1

Depending on the payload size that comes in this could happen.
You can increase the memory limit in your expose configuration file that you can publish with expose publish.

from expose.

eldair avatar eldair commented on August 25, 2024 1

I switched to using wsl 2 and I've set memory limit to 2GB and it works fine now (for same requests)

from expose.

Trashpants avatar Trashpants commented on August 25, 2024

Just to throw my hat into this - I've upped my memory to 2G (tried both 2G and 2GB) and still get this issue. using ngrok no issue at all.

PHP Fatal error:  escapeshellarg(): Argument exceeds the allowed length of 262144 bytes in phar:///Users/nash/.composer/vendor/beyondcode/expose/builds/expose/vendor/namshi/cuzzle/src/Formatter/CurlFormatter.php on line 137

In CurlFormatter.php line 137:
                                                                         
escapeshellarg(): Argument exceeds the allowed length of 262144 bytes  

Also just to add this is on MacOS

from expose.

Trashpants avatar Trashpants commented on August 25, 2024

im really puzzled as to whats happening on my machine then -

Just so im not being a complete idiot, this is the line I have in my config:

    /*
    |--------------------------------------------------------------------------
    | Maximum Allowed Memory
    |--------------------------------------------------------------------------
    |
    | The maximum memory allocated to the expose process.
    |
    */
    'memory_limit' => '1024M',

from expose.

markandrewkato avatar markandrewkato commented on August 25, 2024

This also happens on my mac. Checked the stack trace and it looks like an issue with the "cuzzle" package used where it fails to format large request body.

namshi/cuzzle#20

Not sure if there's a way to update the package being used.

from expose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.