AmruthPillai / Reactive-Resume

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
https://rxresu.me
MIT License
25.88k stars 2.65k forks source link

request entity too large #2097

Open TommasoBilotta opened 1 week ago

TommasoBilotta commented 1 week ago

Is there an existing issue for this?

Product Variant

Self-Hosted

Current Behavior

Hi, I'm trying to import my cv from json and I get this error:

[Nest] 88 - 11/09/2024, 1:24:34 PM ERROR [ExceptionsHandler] request entity too large PayloadTooLargeError: request entity too large at readStream (/app/node_modules/.pnpm/raw-body@2.5.2/node_modules/raw-body/index.js:163:17) at getRawBody (/app/node_modules/.pnpm/raw-body@2.5.2/node_modules/raw-body/index.js:116:12) at read (/app/node_modules/.pnpm/body-parser@1.20.2/node_modules/body-parser/lib/read.js:79:3) at jsonParser (/app/node_modules/.pnpm/body-parser@1.20.2/node_modules/body-parser/lib/types/json.js:138:5) at Layer.handle [as handle_request] (/app/node_modules/.pnpm/express@4.19.2/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/app/node_modules/.pnpm/express@4.19.2/node_modules/express/lib/router/index.js:328:13) at /app/node_modules/.pnpm/express@4.19.2/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/app/node_modules/.pnpm/express@4.19.2/node_modules/express/lib/router/index.js:346:12) at next (/app/node_modules/.pnpm/express@4.19.2/node_modules/express/lib/router/index.js:280:10) at internalNext (/app/node_modules/.pnpm/helmet@7.1.0/node_modules/helmet/index.cjs:521:6)

Thank you in advance. Tommaso

Expected Behavior

I expected the json to be loaded.

Steps To Reproduce

No response

What browsers are you seeing the problem on?

No response

What template are you using?

None

Anything else?

I have a working version: https://resume.linuxguru.it/tommaso.bilotta/cv

with the latest version of the CV it doesn't work.

ishwarthecodddr commented 1 week ago

why is every issue assign to @AmruthPillai

abhiya492 commented 1 week ago

When you encounter the error "PayloadTooLargeError: request entity too large," it usually means the JSON file you're trying to import is larger than the server's default limit for request size. To resolve this, you can increase the payload limit in your server's configuration. This adjustment should help you avoid the error.

TommasoBilotta commented 1 week ago

the error is given to me inside the container logs. if it was the reverse proxy the request to the container I don't think would have arrived. chatgpt told me that I have to put a parameter inside the code (I admit my ignorance with this framework):

import { NestFactory } from @.**/core'; import { AppModule } from './app.module'; import as bodyParser from 'body-parser';

async function bootstrap() { const app = await NestFactory.create(AppModule);

// Set a custom size limit for the body app.use(bodyParser.json({ limit: '50mb' })); app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));

await app.listen(3000); } bootstrap();

⁣Ottieni BlueMail per Android ​

Il giorno 11 Nov 2024, 15:55, alle ore 15:55, Abhishek Singh @.***> ha scritto:

When you encounter the error "PayloadTooLargeError: request entity too large," it usually means the JSON file you're trying to import is larger than the server's default limit for request size. To resolve this, you can increase the payload limit in your server's configuration. This adjustment should help you avoid the error.

-- Reply to this email directly or view it on GitHub: https://github.com/AmruthPillai/Reactive-Resume/issues/2097#issuecomment-2468370768 You are receiving this because you authored the thread.

Message ID: @.***>

TommasoBilotta commented 1 week ago

The same error is also given on the rxresu.me cloud

⁣Ottieni BlueMail per Android ​

Il giorno 11 Nov 2024, 18:23, alle ore 18:23, Tommaso Bilotta @.***> ha scritto:

the error is given to me inside the container logs. if it was the reverse proxy the request to the container I don't think would have arrived. chatgpt told me that I have to put a parameter inside the code (I admit my ignorance with this framework):

import { NestFactory } from @.**/core'; import { AppModule } from './app.module'; import as bodyParser from 'body-parser';

async function bootstrap() { const app = await NestFactory.create(AppModule);

// Set a custom size limit for the body app.use(bodyParser.json({ limit: '50mb' })); app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));

await app.listen(3000); } bootstrap();

⁣Ottieni BlueMail per Android ​

Il giorno 11 Nov 2024, 15:55, alle ore 15:55, Abhishek Singh @.***> ha scritto:

When you encounter the error "PayloadTooLargeError: request entity too large," it usually means the JSON file you're trying to import is larger than the server's default limit for request size. To resolve this, you can increase the payload limit in your server's configuration. This adjustment should help you avoid the error.

-- Reply to this email directly or view it on GitHub: https://github.com/AmruthPillai/Reactive-Resume/issues/2097#issuecomment-2468370768 You are receiving this because you authored the thread.

Message ID: @.***>

TommasoBilotta commented 1 week ago

if you want I can send you the json that I try to import. it is about 156KB, to see if it works for you. I have customers who on the same kubernetes upload files of tens of MB on vtiger.

⁣Ottieni BlueMail per Android ​

Il giorno 11 Nov 2024, 18:23, alle ore 18:23, Tommaso Bilotta @.***> ha scritto:

the error is given to me inside the container logs. if it was the reverse proxy the request to the container I don't think would have arrived. chatgpt told me that I have to put a parameter inside the code (I admit my ignorance with this framework):

import { NestFactory } from @.**/core'; import { AppModule } from './app.module'; import as bodyParser from 'body-parser';

async function bootstrap() { const app = await NestFactory.create(AppModule);

// Set a custom size limit for the body app.use(bodyParser.json({ limit: '50mb' })); app.use(bodyParser.urlencoded({ limit: '50mb', extended: true }));

await app.listen(3000); } bootstrap();

⁣Ottieni BlueMail per Android ​

Il giorno 11 Nov 2024, 15:55, alle ore 15:55, Abhishek Singh @.***> ha scritto:

When you encounter the error "PayloadTooLargeError: request entity too large," it usually means the JSON file you're trying to import is larger than the server's default limit for request size. To resolve this, you can increase the payload limit in your server's configuration. This adjustment should help you avoid the error.

-- Reply to this email directly or view it on GitHub: https://github.com/AmruthPillai/Reactive-Resume/issues/2097#issuecomment-2468370768 You are receiving this because you authored the thread.

Message ID: @.***>