I'm using Laravel Vapor for a project and I started getting this error today. It seems to happen randomly in different pages, it first take a minute trying to load and then I get one of this errors.
{"message": "Internal server error"}
{"message": "Endpoint request timed out"}
I'm not sure what the problem is since the error doesn’t show in my vapor-ui logs. Any idea what could be happening? Thanks
Your code is likely timing out due to the timeout and possibly the memory configs on your vapor.yml. Since you're receiving a timeout vs. a 500 or similar error, you're not seeing errors in the logs.
To verify I'd inspect the network requests coming through your browser and when it 'randomly' fails, see if it's always stopping its execution at 10 seconds (or whatever your timeout is in your vapor.yml file). Assuming you're reaching your timeout, I'd suggest doing the following:
timeout config on your vapor.yml file (default is 10 seconds) - Vapor docs: https://docs.vapor.build/1.0/projects/environments.html#timeoutmemory config in your vapor.yml file (default is 1024). Per the docs: Vapor (via AWS Lambda) allocates CPU power to your Lambda function in proportion to the amount of memory configured for the application.. Vapor docs: https://docs.vapor.build/1.0/projects/environments.html#memoryIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With