MichaPau Posted October 26 Share Posted October 26 (edited) Hello On an old page from friends they get this error trying to edit the home page. (No error viewing the published page) All other pages are working. (Editing and viewing). The only difference I see is that the Home page is using a module called ImageExtra which is no longer maintained. ProcessWire version is 3.0.62., PHP version: 8.3.12 Full error message on Save: Quote Error: Exception: SQLSTATE[HY000]: General error: 2006 Server has gone away (in /home/adminlas/public_html/wire/core/WireDatabasePDO.php line 454) #0 /home/adminlas/public_html/wire/core/WireDatabasePDO.php(454): PDOStatement->execute() #1 /home/adminlas/public_html/wire/core/PagesLoader.php(661): ProcessWire\WireDatabasePDO->execute(Object(PDOStatement)) #2 /home/adminlas/public_html/wire/core/Pages.php(687): ProcessWire\PagesLoader->getById(Array, Array, NULL) #3 /home/adminlas/public_html/wire/core/PagesType.php(293): ProcessWire\Pages->getById(Array, Array) #4 /home/adminlas/public_html/wire/core/Users.php(58): ProcessWire\PagesType->get(1056) #5 /home/adminlas/public_html/wire/core/Session.php(171): ProcessWire\Users->get(1056) #6 /home/adminlas/public_html/wire/core/ProcessWire.php(432): ProcessWire\Session->__construct(Object(ProcessWire\ProcessWire)) #7 /home/adminlas/public_html/wire/core/ProcessWire.php(209): ProcessWire\ProcessWire->load(Object(ProcessWire\Config)) #8 /home/adminlas/public_html/index.php Anyone has an idea how to investigate this error further? [Edit] I guess this means that there is some timeout. Can it be that they are using too many, too big images ? The template has an image field with no limitations. I tried to set max_execution_time to 300 for the php but it still hangs an save. This error started suddenly without any modifications to the processwire files, templates etc... Edited October 26 by MichaPau Link to comment Share on other sites More sharing options...
BitPoet Posted October 27 Share Posted October 27 Is that on a shared hosting server? The error indicates that the execution time of a mysql query was exceeded or a memory limitation in the database was reached, in which case the server aborts the query and drops the connection. Those are often pretty close knit on shared hosts. If you have access to the database itself, the first thing to look at would be wait_timeout. "SELECT @@wait_timeout" will give you the seconds MySQL will spend on a query. If that is very low, you can try setting a higher per-session value through $config->dbInitCommand in site/ready.php. $config->dbInitCommand = "SET NAMES '{charset}'; SET wait_timeout = 300"; Link to comment Share on other sites More sharing options...
MichaPau Posted October 27 Author Share Posted October 27 (edited) Thank you for an answer, Yes, I do have access via this cPanel->phpMyAdmin interface. (I guess it is a shared hosting) information-schema -> GLOBAL_VARIABLES -> WAIT_TIMEOUT = 40 still, they don't have thousands of images on their Home page, but only a few hundreds...(although some are quit big ) I guess there is no way to disable temporarily a field in the processwire backend on save, to debug which one makes it hang and timeout, right? Another question is if it would be save to simply delete entries from the field table directly in the db (because it is not possible anymore from the backend, which timeouts) - Can't find a site/ready.php file on the server, did you mean site/config.php ? Edited October 27 by MichaPau Link to comment Share on other sites More sharing options...
BitPoet Posted October 27 Share Posted October 27 6 hours ago, MichaPau said: did you mean site/config.php Yes, I did. Sorry for the mixup. If upping wait_timeout, deleting individual entries from your image field's table is normally an option, but I'm not familiar with ImageExtra. So I'd make sure to have a working database backup before attempting it. One thing you could try is setting the field you want to exclude from saving to hidden. Link to comment Share on other sites More sharing options...
MichaPau Posted October 28 Author Share Posted October 28 (edited) 21 hours ago, BitPoet said: One thing you could try is setting the field you want to exclude from saving to hidden. Do you mean Fields -> Edit Field -> Visibility -> Presentation -> [ComboBox select] -> Hidden (not show in the editor) ? [Edit] Yes, that worked actually, thanks again. Any idea what would happen if I set `Edit Field -> Details -> maximum files allowed` to some number (it is 0=no limit in the moment) ? --- Still, I can't really imagine why this happens. A field type->images on the homepage template with ~500 entries should not hang the server for so long. The database doesn't even store the image data, only path, description, title etc.. But yes hidding this field let me save the page with all its other fields.. Edited October 28 by MichaPau Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now