update_daemon2.php crash after latest "git pull"

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
User avatar
Sadok
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 18 Mar 2013, 10:02

update_daemon2.php crash after latest "git pull"

Postby Sadok » 17 Apr 2013, 11:07

Hi. After latest "git pull" "update_daemon2.php wrote to log:

Code: Select all

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /usr/repo/Tiny-Tiny-RSS/include/db.php on line 80

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /usr/repo/Tiny-Tiny-RSS/include/db.php on line 89
Query <i>INSERT INTO ttrss_error_log
                                (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
                                (2, 'mysql_result() expects parameter 1 to be resource, boolean given', 'include/db.php', '98', '', NULL, NOW())</i> failed: Cannot add or update a child row: a foreign key constraint fails (`ttrss`.`ttrss_enclosures`, CONSTRAINT `ttrss_enclosures_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `ttrss_entries` (`id`) ON DELETE CASCADE)[06:55:13/52816] removing lockfile (52816)...
Query <i>INSERT INTO ttrss_error_log
                                (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
                                (2, 'mysql_query(): MySQL server has gone away', 'include/db.php', '65', '', NULL, NOW())</i> failed: MySQL server has gone away[06:55:13/52817] removing lockfile (52817)...
[06:55:13/52815] [reap_children] child 52816 seems active but lockfile is unlocked.
[06:55:13/52815] [reap_children] child 52817 reaped.
[06:55:13/52815] [SIGCHLD] jobs left: 0
[06:55:13/52815] [SIGCHLD] jobs left: 0


MySQL 5.5.30

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: update_daemon2.php crash after latest "git pull"

Postby fox » 17 Apr 2013, 11:29

update the database

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: update_daemon2.php crash after latest "git pull"

Postby xtaz » 17 Apr 2013, 12:05

I'm also having it crash on me with a different error. And my database is running 118.sql version which appears to be the latest, it updated to that yesterday afternoon but I'm only having this issue since the latest pull this morning:

Code: Select all

[07:59:50/68419] [SIGCHLD] jobs left: 0
[08:00:49/68419] [MASTER] active jobs: 0, next spawn at 0 sec.
Query <i>INSERT INTO ttrss_error_log
                                (errno, errstr, filename, lineno, context, owner_uid, created_at) VALUES
                                (2, 'Error while sending INIT_DB packet. PID=68419', 'include/db.php', '33', '', NULL, NOW())</i> failed: MySQL server has gone away
[08:00:50/68419] removing lockfile (master)...


And my database definitely hasn't gone away as I'm using it for other things.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: update_daemon2.php crash after latest "git pull"

Postby fox » 17 Apr 2013, 12:16

I guess the database handle might get closed which messes with logging.

Edit: or it tries to connect to log something while the script is ending.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: update_daemon2.php crash after latest "git pull"

Postby fox » 17 Apr 2013, 12:25

Yeah I think I broke something in there...

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: update_daemon2.php crash after latest "git pull"

Postby fox » 17 Apr 2013, 12:37

Try updating.

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: update_daemon2.php crash after latest "git pull"

Postby xtaz » 17 Apr 2013, 12:53

Seems to be working now. Thanks!

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: update_daemon2.php crash after latest

Postby sleeper_service » 17 Apr 2013, 21:27

fox wrote:update the database


is there a way to update the db via command line?

I'm thinking about a script to stop the update daemon, do a git pull, then update the db and start the update daemon back up.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: update_daemon2.php crash after latest "git pull"

Postby fox » 17 Apr 2013, 21:41

Yes, check update.php --help.

feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Re: update_daemon2.php crash after latest

Postby feader » 17 Apr 2013, 22:48

sleeper_service wrote:I'm thinking about a script to stop the update daemon, do a git pull, then update the db and start the update daemon back up.

This could be done with a git hook, but I haven't yet figured out which is the right one for this. Then the script could also do a db dump before updating the db, just in case.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: update_daemon2.php crash after latest "git pull"

Postby sleeper_service » 17 Apr 2013, 23:07

fox wrote:Yes, check update.php --help.


thank you, good vomiting gnome ;)

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: update_daemon2.php crash after latest

Postby sleeper_service » 17 Apr 2013, 23:09

feader wrote:
sleeper_service wrote:I'm thinking about a script to stop the update daemon, do a git pull, then update the db and start the update daemon back up.

This could be done with a git hook, but I haven't yet figured out which is the right one for this. Then the script could also do a db dump before updating the db, just in case.


the tricky bit will be automating the updating of config.php, I already use diff and patch to add new bits, but so far I've just manually edited out the customized variables from the patch file to keep them from being reset to default.

feader
Bear Rating Master
Bear Rating Master
Posts: 160
Joined: 26 Dec 2012, 20:03

Re: update_daemon2.php crash after latest "git pull"

Postby feader » 17 Apr 2013, 23:31

sleeper_service wrote:the tricky bit will be automating the updating of config.php, I already use diff and patch to add new bits, but so far I've just manually edited out the customized variables from the patch file to keep them from being reset to default.

I recently had to do some … testing, and maybe it is better to do it in the opposite direction (merging -dist into config.php), since ttRSS doesn't complain about to much variables, and the basic definitions (db data, URL) seem stable. Best experience I had so far was an interactive merge, and I don't have a good feeling when this would be done automatically.
But the other parts are doable.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: update_daemon2.php crash after latest "git pull"

Postby sleeper_service » 18 Apr 2013, 01:08

feader wrote:
sleeper_service wrote:the tricky bit will be automating the updating of config.php, I already use diff and patch to add new bits, but so far I've just manually edited out the customized variables from the patch file to keep them from being reset to default.

I recently had to do some … testing, and maybe it is better to do it in the opposite direction (merging -dist into config.php), since ttRSS doesn't complain about to much variables, and the basic definitions (db data, URL) seem stable. Best experience I had so far was an interactive merge, and I don't have a good feeling when this would be done automatically.
But the other parts are doable.


I'm thinking copy dist over to config, then apply a patch with the variables I have set up... that'd work 'cept for when mr sly fox changes the variable names, like he recently did with the smtp server.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 12 guests