Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2013-07-22 18:42:25

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

MySQL server has gone away

Any idea how to fix this? happens when i try to Upload from FTP.

Query: UPDATE video SET slidenum = '74', slideoffset = '5' WHERE video_id = 2391 LIMIT 1
Error Message: MySQL server has gone away
Error Number: 2006

Offline

#2 2013-07-26 05:18:04

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: MySQL server has gone away

This is from the nuevo player. Its not by default in Adult Script Pro. You could re-connect to mysql before running this query with:

VF::factory_remove('database');
$db = VF::factory('database'); 

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2013-07-26 18:54:37

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: MySQL server has gone away

I fixed it that day by doing this:

max_allowed_packet=64M

I will run that command later today.

Offline

#4 2013-07-26 21:32:15

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: MySQL server has gone away

DuttyRock wrote:

I fixed it that day by doing this:

max_allowed_packet=64M

This is good step to avoid mysql timeout.
another is to experiment with mysql  "wait_timeout" option value

Good resource about MySQL "gone" issue you can find here:
http://tech-stuff.org/mysql-tip-mysql-s … ing-query/

Finally last option is as Symtab suggested, reconnect database before query is to be executed. This is like sure-fire solution.

MySQL "gone away" error may appear when you generate thumbs for long video, usually over 30 minutes.
Imagine how much time it can take, it's few hundreds thumbs to generate and combine into one image, few hundreds of ffmpeg commands.

Last edited by Nuevolab (2013-07-26 22:08:21)

Offline

#5 2013-07-28 07:54:22

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: MySQL server has gone away

Im getting this when trying to run those commands:

mysql> VF::factory_remove('database');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VF::factory_remove('database')' at line 1
mysql> $db = VF::factory('database');

Offline

#6 2013-07-28 08:53:53

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: MySQL server has gone away

A new error:

Query: SELECT COUNT(*) AS total_visitors FROM link_in WHERE link_id = 10 AND ip = 2130706433 AND DATE_FORMAT(click_date, '%y-%m-%d') = DATE_FORMAT(NOW(), '%y-%m-%d')
Error Message: Table './freetube/link_in' is marked as crashed and last (automatic?) repair failed
Error Number: 144

Offline

#7 2013-07-28 12:34:08

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: MySQL server has gone away

DuttyRock wrote:

A new error:

Query: SELECT COUNT(*) AS total_visitors FROM link_in WHERE link_id = 10 AND ip = 2130706433 AND DATE_FORMAT(click_date, '%y-%m-%d') = DATE_FORMAT(NOW(), '%y-%m-%d')
Error Message: Table './freetube/link_in' is marked as crashed and last (automatic?) repair failed
Error Number: 144

This isnot connected to Nuevoplayer in any way.
If error shows corrupted table why don't you check this table in PHPMyAdmin, try to repair table, or just remove all records from it.
If nothing helps, remove table and create same but new and empty.

Offline

#8 2013-07-28 12:45:00

Nuevolab
Member
Registered: 2012-08-01
Posts: 189

Re: MySQL server has gone away

DuttyRock wrote:

Im getting this when trying to run those commands:

mysql> VF::factory_remove('database');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VF::factory_remove('database')' at line 1
mysql> $db = VF::factory('database');

I'm not so familiar with AdultScriptPro, don't know exactly how to close ASP database, didn't try.
Symtab should know more.
Maybe it's something wrong with your database, as Symtab's mysql reconnect example works for me fine.

Offline

#9 2013-07-28 19:28:12

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: MySQL server has gone away

You dont need to run those from mysql. You need to use those lines in php. The MySQL connection is closed automatically.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

Board footer

Powered by FluxBB