Timeout...how?

[22-Sep-2024 12:40:26 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\inetpub\wwwroot\includes\header.php on line 4

File in question:

<?php
	session_start();
?>
<html>

…how?

1 Like

Maybe theres heaps of sessions on disk and starting this session triggered garbage collection.

Reading from the docs and following Occam’s Razor, it says this regarding session_start():

When session_start() is called or when a session auto starts, PHP will call the open and read session save handlers. These will either be a built-in save handler provided by default or by PHP extensions (such as SQLite or Memcached); or can be custom handler as defined by session_set_save_handler(). The read callback will retrieve any existing session data (stored in a special serialized format) and will be unserialized and used to automatically populate the $_SESSION superglobal when the read callback returns the saved session data back to PHP session handling.

So it would seem that the “session save handlers” are sucking up a lot of CPU for some reason?

I assume something was choking the machine with sessions, as it appears to have cleared the issue this morning… still not sure why that error would occur on line 4, outside of a PHP block though.