Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 06 Dec 2016, 22:00
zero477 zero477 is offline
 
Join Date: Jan 2012
Query causing MySQL server has gone away

Any idea of why this query is causing the error:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #2  
Old 06 Dec 2016, 22:06
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
There are many things that could cause this, refer to the list at: http://dev.mysql.com/doc/refman/5.7/en/gone-away.html
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 06 Dec 2016, 22:10
zero477 zero477 is offline
 
Join Date: Jan 2012
Thanks Dave!!

--------------- Added 06 Dec 2016 at 22:16 ---------------

Originally Posted by Dave View Post
There are many things that could cause this, refer to the list at: http://dev.mysql.com/doc/refman/5.7/en/gone-away.html
Hello Dave,

Following your adivce I saw this in the link you provided:

"You tried to run a query after closing the connection to the server. This indicates a logic error in the application that should be corrected."

I have some widgets that connect to a different DATABASE that the one that has vbulletin. Maybe this is why the error is happening.

Do you know what happens if I connect to another database in a widget and then in another use vbulletin's database class to do the query?

I use vbulletin's database class to do the query that.

What logic should I use in these widgets that connect to external databases?

Last edited by zero477; 06 Dec 2016 at 22:17. Reason: spelling
Reply With Quote
  #4  
Old 06 Dec 2016, 22:30
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Multiple database connections should work fine, unless the code of the widget closes the database connection of vBulletin. If you disable the widget, does it work?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 07 Dec 2016, 00:30
zero477 zero477 is offline
 
Join Date: Jan 2012
Hello dave,

Thanks again for your quick response.

It normally works (with or without the widget), sometimes i get an email from vbulletin alerting me about this error. But it usually works.

Greetings,
Eddie
Reply With Quote
  #6  
Old 07 Dec 2016, 00:51
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
If it's an inconsistent problem then your widgets might not be the cause. Are those widgets sidebar blocks or something else? Try setting cache time to 0 (no caching) and see what happens.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #7  
Old 07 Dec 2016, 01:11
zero477 zero477 is offline
 
Join Date: Jan 2012
Originally Posted by Dave View Post
If it's an inconsistent problem then your widgets might not be the cause. Are those widgets sidebar blocks or something else? Try setting cache time to 0 (no caching) and see what happens.
I currently do not catch. I will try setting up it with catching an see if that makes the fix!

Alstublieft again Dave! (I have seen your site, you look like a great developer. I lived in Groningen for 2 years and now live in Mexico I will keep in touch)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 05:28.

Layout Options | Width: Wide Color: