PHP Manual
Senior Developer

How to deal with sudden PHP script crashes

11. 02. 2023

A story from the end of 2016, when I was literally saved by a colleague: in a PHP application, you decide to check in images via a proxy script, which, among other things, can adjust their dimensions and other parameters according to the incoming request. As part of the optimization, you also save the generated variants physically to disk.

However, in production operation, you suddenly start seeing a huge load and thousands of requests queued up. The images are loaded sequentially one by one for each user. Page refreshes and link clicks don't work. The application seems completely frozen. It only works to wait for everything to process.

What could be the problem? I have listed 3 major clues in the text to enable a quick search for the problem. Hotfix has a trivial solution.

Jan Barášek   Více o autorovi

Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.

Rád vám pomůžu:

Související články

All systems normal.