Case Study
During a server migration, the first WordPress site moved to the new server would not load. Every full page hung for about five minutes until the web server gave up, while a test PHP file and WordPress’s command line worked normally. PHP was running at full CPU without touching the disk, the network or the database. A debugger showed it spinning between the ionCube loader and OPcache, and three test runs isolated one setting. We turned off the OPcache optimizer, kept the cache, and the page loaded in 2.2 seconds.
July 2026 · 4 min read
SECTOR
Business moving its hosted websites to a new server
SCALE
Plesk server migration, WordPress sites
PLATFORM
CloudLinux 10, Plesk Obsidian, PHP 7.3 under FastCGI, ionCube Loader 14.4, OPcache
ENGAGEMENT
Incident during migration: page renders hung
Homepage render time, hung before the fix, warm after it
Made by the hung PHP process in 3 seconds of tracing at 99% CPU
Given the same one-line fix, because the loader is loaded on all of them
Scroll the diagram sideways to see all of it →
One setting separated a page that rendered from a page that never finished.
A page that never finished. The site had been copied to the new server and switched to the same PHP version it used before. Every full WordPress page then hung for about five minutes until FastCGI’s read timeout ended it, and nginx logged that the upstream had closed the connection early. Not everything was broken: a phpinfo() test file returned 200 straight away, and WP-CLI worked against the same site. So PHP started, the files were in place and the database was reachable. Something inside a real page render never came back.
Rule out waiting, then look at what PHP was doing. Along the way we found and fixed a separate migration trap: the new server still resolved the site’s own name to the old server, so any request the site made to itself went to the wrong machine. It was pinned to the new server for the duration of the move. The hang stayed. The database connected in 0.008 s and its process list was empty, so PHP was not waiting on a query. The PHP process sat at about 99% CPU, and a 3-second strace recorded no system calls at all: no disk, no network, no database. It was looping in user space. A gdb backtrace of the stuck process showed the PHP executor, the ionCube loader and opcache.so, spinning. None of the site’s plugins or themes was ionCube-encoded, but the loader is loaded globally and hooks every script PHP compiles.
The process was at full CPU and made no system calls. That rules out waiting. PHP was stuck in a loop.
Three runs, one setting changed each time. We requested the same homepage three times. With opcache.enable=0 it rendered the full 276 KB page. With OPcache at its defaults it hung until the timeout. With OPcache on and opcache.optimization_level=0 it rendered again. That points to the combination of ionCube Loader 14.4 and OPcache’s optimizer passes on this build, not to either one alone. We did not identify the exact code path inside the loader or the optimizer, and we did not measure what switching the optimizer off costs in speed. The optimizer only rewrites compiled code; OPcache still caches the compiled scripts, which is where most of its benefit comes from.
Right after a migration, every full WordPress page on the first site hung for about five minutes. A test PHP file and WP-CLI worked.
PHP at 99% CPU with zero system calls; gdb showed the ionCube loader and OPcache spinning; three test runs isolated the optimizer.
OPcache optimizer switched off, caching kept, on all eleven PHP builds. Homepage 200 in 4.1 s cold and 2.2 s warm.
99-ioncube-opcache-fix.ini with opcache.optimization_level=0, so it survives package updates and is easy to remove laterThe page loaded, and the rest of the migration went ahead. The homepage returned HTTP 200 with the full 275,747-byte page, in 4.1 seconds cold and 2.2 seconds warm. The fix was applied to every PHP version before the remaining sites were moved, so we do not know how many of them would have hit the same loop; some may never have. What is not here: a speed comparison with the optimizer on, because with it on the page never finished. The lesson we take: when PHP hangs at full CPU with no system calls, stop looking at the database and the network, and start switching extensions off one at a time.
We trace hangs down to the process, fix the cause, and move your sites without surprises on the new server.