New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted #6396

Closed
caBBAlainB opened this Issue Apr 22, 2015 · 10 comments

Comments

Projects
None yet
3 participants
@caBBAlainB

caBBAlainB commented Apr 22, 2015

Hi,
That's not the first time I get such error, on no particular request or table and it begins to worry me.
It even happens very often regarding the few amount of requests I can do. I'm afraid about what will happen once the website will be on production.
I own a PRO hosting at OVH. So, I doubt the problem could come from their side...

Here are the infos I can provide from Debugkit. I hope this will evoke something.

From VARIABLES page:

messageSQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted url/Sitraexports/processexport
errorUnserializable object - Cake\Database\Exception. Error: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted in /home/modulwoo/www/2ndGuideTest/vendor    /cakephp/cakephp/src/Database/Schema/Collection.php, line 130
code500
_serialize(array)

From SQL LOG

SHOW FULL COLUMNS FROM `paiements`  16  8
SHOW INDEXES FROM `paiements`   1   0
SELECT * FROM information_schema.key_column_usage AS kcu INNER JOIN information_schema.referential_constraints AS rc ON (kcu.CONSTRAINT_NAME = rc.CONSTRAINT_NAME) WHERE kcu.TABLE_SCHEMA = 'modulwoomobtst' AND kcu.TABLE_NAME = 'paiements' and rc.TABLE_NAME = 'paiements'

Stacktrace:

2015-04-22 20:48:30 Error: [Cake\Database\Exception] SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted
Request URL: /Sitraexports/processexport
Stack Trace:
#0 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/Database/Schema/Collection.php(102): Cake\Database\Schema\Collection->_reflect('ForeignKey', 'paiements', Array, Object(Cake\Database\Schema\Table))
#1 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php(65): Cake\Database\Schema\Collection->describe('paiements', Array)
#2 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Table.php(425): Cake\Database\Schema\CachedCollection->describe('paiements')
#3 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Query.php(141): Cake\ORM\Table->schema()
#4 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Query.php(123): Cake\ORM\Query->addDefaultTypes(Object(App\Model\Table\PaiementsTable))
#5 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Table.php(1147): Cake\ORM\Query->__construct(Object(Cake\Database\Connection), Object(App\Model\Table\PaiementsTable))
#6 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Table.php(882): Cake\ORM\Table->query()
#7 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Association.php(582): Cake\ORM\Table->find('all', Array)
#8 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Association/SelectableAssociationTrait.php(95): Cake\ORM\Association->find('all', Array)
#9 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Association/BelongsToMany.php(924): Cake\ORM\Association\BelongsToMany->_buildBaseQuery(Array)
#10 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Association/SelectableAssociationTrait.php(52): Cake\ORM\Association\BelongsToMany->_buildQuery(Array)
#11 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/EagerLoader.php(539): Cake\ORM\Association\BelongsToMany->eagerLoader(Array)
#12 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Query.php(645): Cake\ORM\EagerLoader->loadExternal(Object(Cake\ORM\Query), Object(Cake\Database\Log\LoggingStatement))
#13 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/Datasource/QueryTrait.php(218): Cake\ORM\Query->_execute()
#14 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/ORM/Query.php(596): Cake\ORM\Query->_all()
#15 /home/modulwoo/www/2ndGuideTest/src/Controller/SitraexportsController.php(144): Cake\ORM\Query->all()
#16 [internal function]: App\Controller\SitraexportsController->processexport()
#17 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/Controller/Controller.php(404): call_user_func_array(Array, Array)
#18 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(114): Cake\Controller\Controller->invokeAction()
#19 /home/modulwoo/www/2ndGuideTest/vendor/cakephp/cakephp/src/Routing/Dispatcher.php(87): Cake\Routing\Dispatcher->_invoke(Object(App\Controller\SitraexportsController))
#20 /home/modulwoo/www/2ndGuideTest/webroot/index.php(37): Cake\Routing\Dispatcher->dispatch(Object(Cake\Network\Request), Object(Cake\Network\Response))
#21 {main}

Paiements table is just read to build a list of possible values.

Of course I can repeat the exact same request many times without problem before getting it back, maybe, or maybe not... :-/

Regards,
Alain

@markstory markstory added this to the 3.0.3 milestone Apr 23, 2015

@markstory

This comment has been minimized.

Show comment
Hide comment
@markstory

markstory Apr 23, 2015

Member

Sounds like your MySQL server is not giving schema reflection results fast enough and MySQL is timing out.

This comment explains how/why this slowness happens, and this comment in the app skeleton should help address the issue.

Member

markstory commented Apr 23, 2015

Sounds like your MySQL server is not giving schema reflection results fast enough and MySQL is timing out.

This comment explains how/why this slowness happens, and this comment in the app skeleton should help address the issue.

@markstory markstory closed this Apr 23, 2015

@caBBAlainB

This comment has been minimized.

Show comment
Hide comment
@caBBAlainB

caBBAlainB Apr 23, 2015

Does this problem particular to innoDB?

caBBAlainB commented Apr 23, 2015

Does this problem particular to innoDB?

@lorenzo

This comment has been minimized.

Show comment
Hide comment
@lorenzo

lorenzo Apr 23, 2015

Member

It is a problem of mysql < 5.6

Member

lorenzo commented Apr 23, 2015

It is a problem of mysql < 5.6

@caBBAlainB

This comment has been minimized.

Show comment
Hide comment
@caBBAlainB

caBBAlainB Apr 23, 2015

I tried to apply 'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
but I get
Error: SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need the SUPER privilege for this operation

caBBAlainB commented Apr 23, 2015

I tried to apply 'init' => ['SET GLOBAL innodb_stats_on_metadata = 0'],
but I get
Error: SQLSTATE[42000]: Syntax error or access violation: 1227 Access denied; you need the SUPER privilege for this operation

@lorenzo

This comment has been minimized.

Show comment
Hide comment
@lorenzo

lorenzo Apr 23, 2015

Member

yeah, you do need super priveledge for that. The best thing is setting the variable directly in the mysql config.

Member

lorenzo commented Apr 23, 2015

yeah, you do need super priveledge for that. The best thing is setting the variable directly in the mysql config.

@caBBAlainB

This comment has been minimized.

Show comment
Hide comment
@caBBAlainB

caBBAlainB Apr 23, 2015

Ok Jose, I'm going to see that.
Thanks.

caBBAlainB commented Apr 23, 2015

Ok Jose, I'm going to see that.
Thanks.

@caBBAlainB

This comment has been minimized.

Show comment
Hide comment
@caBBAlainB

caBBAlainB Apr 23, 2015

I though again about this problem and I still have a doubt about the issue.
According to what I read in some posts and the discussions Mark pointed me on, the error mentioned in this posts clearly talk about timeout.
In my case, I don't see any references about time and everytime I get it, the return is immediate and as the error is:

messageSQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted url/Sitraexports/processexport
errorUnserializable object - Cake\Database\Exception. Error: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted in /home/modulwoo/www/2ndGuideTest/vendor    /cakephp/cakephp/src/Database/Schema/Collection.php, line 130
code500
_serialize(array)

I wonder why you are talking about timeout.

Can you enlight me please?

caBBAlainB commented Apr 23, 2015

I though again about this problem and I still have a doubt about the issue.
According to what I read in some posts and the discussions Mark pointed me on, the error mentioned in this posts clearly talk about timeout.
In my case, I don't see any references about time and everytime I get it, the return is immediate and as the error is:

messageSQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted url/Sitraexports/processexport
errorUnserializable object - Cake\Database\Exception. Error: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted in /home/modulwoo/www/2ndGuideTest/vendor    /cakephp/cakephp/src/Database/Schema/Collection.php, line 130
code500
_serialize(array)

I wonder why you are talking about timeout.

Can you enlight me please?

@markstory

This comment has been minimized.

Show comment
Hide comment
@markstory

markstory Apr 23, 2015

Member

I mentioned timeouts as when I googled your error, that's what came up 😄

Member

markstory commented Apr 23, 2015

I mentioned timeouts as when I googled your error, that's what came up 😄

@caBBAlainB

This comment has been minimized.

Show comment
Hide comment
@caBBAlainB

caBBAlainB Apr 23, 2015

;) yes markstory but it's because I saw these posts didn't match my problem that I though it could come from an other reason.
An OVH guy is looking at the problem. I hope he will find something more specific.

I got it three times today, + a 'server has gone away' :(

caBBAlainB commented Apr 23, 2015

;) yes markstory but it's because I saw these posts didn't match my problem that I though it could come from an other reason.
An OVH guy is looking at the problem. I hope he will find something more specific.

I got it three times today, + a 'server has gone away' :(

@caBBAlainB

This comment has been minimized.

Show comment
Hide comment
@caBBAlainB

caBBAlainB Apr 25, 2015

The problem effectively was on the server side.
OVH determined that my DB was on an overloaded shared server.
Now I'm on a private SQL server and everything is fine! 😄

caBBAlainB commented Apr 25, 2015

The problem effectively was on the server side.
OVH determined that my DB was on an overloaded shared server.
Now I'm on a private SQL server and everything is fine! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment