PayloadTooLargeError: request entity too large


#1

Hello, at some time recently I noticed our app start (Android) to do this when running via console process:

PayloadTooLargeError: request entity too large
    at readStream (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\raw-body\index.js:155:17)
    at getRawBody (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\raw-body\index.js:108:12)
    at read (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\body-parser\lib\read.js:77:3)
    at jsonParser (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\body-parser\lib\types\json.js:135:5)
    at Layer.handle [as handle_request] (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\express\lib\router\layer.js:95:5)
    at trim_prefix (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\express\lib\router\index.js:317:13)
    at C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\express\lib\router\index.js:284:7
    at Function.process_params (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\express\lib\router\index.js:335:12)
    at next (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\express\lib\router\index.js:275:10)
    at expressInit (C:\Users\karlk\AppData\Roaming\npm\node_modules\expo-cli\node_modules\express\lib\middleware\init.js:40:5)

Hard to tell where exactly the problem is, but it’s getting more frequent. Any ideas on what I can do to chase it down? Entry points into my code that this trace mentions don’t seem very helpful.
Can I configure the runtime server to increase this payload size, and/or should I?

thanks for any help on this.


#2

Hey @karlkras,

Are you making any large queries with fetch in your app or does your project have a lot of assets involved?

Cheers,
Adam