Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG]

Open kristianjackson opened this issue 2 years ago • 1 comments

Describe the bug Loading in a 48M PDF file is producing the following error:

Failed to save chatflow:

Error
PayloadTooLargeError: request entity too large
   at readStream (/home/kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/raw-body/index.js:156:17)
   at getRawBody (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/raw-body/index.js:109:12)
   at read (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/body-parser/lib/read.js:79:3)
   at jsonParser (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/body-parser/lib/types/json.js:135:5)
   at Layer.handle [as handle_request] (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/express/lib/router/index.js:328:13)
   at /home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/express/lib/router/index.js:286:9
   at Function.process_params (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/express/lib/router/index.js:346:12)
   at next (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/express/lib/router/index.js:280:10)
   at expressInit (/home/Kristian/.nvm/versions/node/v18.12.1/lib/node_modules/flowise/node_modules/express/lib/middleware/init.js:40:5)

To Reproduce Steps to reproduce the behavior:

Use PDF file to load the PDF, when clicking save on the flow the error is produced.

Expected behavior I expected the document to be loaded for use by the flow.

Screenshots image

Additional context Add any other context about the problem here.

kristianjackson avatar May 12 '23 17:05 kristianjackson

Can you try increase the size to 100mb here: https://github.com/FlowiseAI/Flowise/blob/main/packages/server/src/index.ts#L66 and https://github.com/FlowiseAI/Flowise/blob/main/packages/server/src/index.ts#L67

HenryHengZJ avatar May 12 '23 18:05 HenryHengZJ

That resolved the problem. So not really a "bug" but a configuration. Closing. My apologies.

kristianjackson avatar May 15 '23 04:05 kristianjackson

Hello @kristianjackson Im getting same error, can you write me down how did you fix it? How can i increase limits? Thanks.

halil-cosdu-bear avatar Aug 17 '23 09:08 halil-cosdu-bear

Same here.

toto83fr avatar Sep 17 '23 12:09 toto83fr

I have this issue right now, I have a exported DB file larger than 50MB, and now it won't import again. Where can the limit be set, I can only see it hard coded.

KeLeKaPe avatar Oct 16 '23 11:10 KeLeKaPe

I have added 9 PDF File components. Total pdf files is 138mb I changed this in the index.js file

my local install C:\Users\User\node_modules\flowise\dist

async config(socketIO) { // Limit is needed to allow sending/receiving base64 encoded string this.app.use(express_1.default.json({ limit: '150mb' })); this.app.use(express_1.default.urlencoded({ limit: '150mb', extended: true }));

I still get this error after restarting flowise.

Failed to save chatflow:

Error
PayloadTooLargeError: request entity too large
   at readStream (C:\Users\User\node_modules\raw-body\index.js:156:17)
   at getRawBody (C:\Users\User\node_modules\raw-body\index.js:109:12)
   at read (C:\Users\User\node_modules\body-parser\lib\read.js:79:3)
   at jsonParser (C:\Users\User\node_modules\body-parser\lib\types\json.js:135:5)
   at Layer.handle [as handle_request] (C:\Users\User\node_modules\express\lib\router\layer.js:95:5)
   at trim_prefix (C:\Users\User\node_modules\express\lib\router\index.js:328:13)
   at C:\Users\User\node_modules\express\lib\router\index.js:286:9
   at Function.process_params (C:\Users\User\node_modules\express\lib\router\index.js:346:12)
   at next (C:\Users\User\node_modules\express\lib\router\index.js:280:10)
   at expressInit (C:\Users\User\node_modules\express\lib\middleware\init.js:40:5)

Any ideas.

Or a different approach ? The project is regulation documents spread over 9 PDF files.

Toolfolks avatar Feb 09 '24 15:02 Toolfolks

I had to lose the project as it would not save. I added the merged pdf file 138 mb to another project and it saved ok.

So I presume the above settings are correct. ( Can anyone from admin confirm this )

Toolfolks avatar Feb 09 '24 15:02 Toolfolks

adding FLOWISE_FILE_SIZE_LIMIT = 200mb the same error, someone findout the fix pls?

int211 avatar Mar 27 '24 15:03 int211