[TYPO3-dev] "mysql server has gone away" if plugin is inserted twice

Thomas Kowtsch thomas at kowtsch.de
Wed Oct 5 22:46:06 CEST 2011


Hi all,

I traced a very crazy problem for the "calendar base" (cal) extension 
these days [1]

Short description:
- During plugin init, several configs are loaded. One of them: A pidList 
which holds the event records
- If there is only one plugin on a page, everything is fine
- If there are more than 1 plugins on a page, the pidList does not get 
resolved anymore
- Contrary to this, everything works if you are logged in to the backend 
in the same browser.

pidList resolving is done this way:
- start point + recursive yes/no defined by TS/flexform
- call to pibase->pi_getPidList() with these settings
- this calls tslib_content->getTreeList()

There is a check, if nothing is cached, a call to 
t3lib_page->getRawRecord() is submitted

There, the first SQL call to check the first pid (start point) suddenly 
fails: The SQL execution fails with "mysql server has gone away"

The SQL statement itself is ok:
 >>SELECT uid FROM pages WHERE uid = 171 AND pages.deleted=0

And yes, it's the same SQL, no matter if you have 1,2, or 20 plugins on 
the page.

My question is now: Does anybody knows such a problem? And if yes - how 
can this be solved from within the extension?

As first workaround, I tried to play around with MySQL settings: 
increasing the value of max_allowed_packet in mysql config works. But I 
don't see a reason how the statement above could grow to more than 1M 
(the mysql default).

Does anybody has an idea?

Thanks for any hint,

Thomas


[1] http://forge.typo3.org/issues/29640




More information about the TYPO3-dev mailing list