Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

karanapil's avatar

Laravel App Slow and Timeout on AWS

I am writing to bring to your attention an issue regarding the performance of a Laravel application that I have hosted on an AWS t2.micro instance, operating within the free tier. The server specifications are as follows:

RAM: 1 GB Processor: 1 Core Storage: 30 GB SSD The concern arises from the observation that while the website performs adequately immediately after instance restarts, it experiences significant slowdowns over time, culminating in instances of a 504 Gateway Time-out error.

In light of this, I am seeking guidance on whether the performance degradation is attributable to insufficient server resources or potential coding errors within the application itself.

I would greatly appreciate any insights or recommendations you could provide to address this issue effectively.

Thank you for your attention to this matter.

0 likes
1 reply
nexxai's avatar

If it's happening over time, this would suggest to me that it's some kind of memory leak building up until it has consumed all 1GB, and then a reboot clears the leaked memory until it builds up over time and the process repeats.

Without knowing what your app does, is it possible to share more info? Are there background processes behind the scenes doing things? What else, besides the raw PHP processes are doing things?

Please or to participate in this conversation.