Skip to content
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

SQL error background job #2688

Closed
amittel opened this issue Dec 15, 2016 · 9 comments
Closed

SQL error background job #2688

amittel opened this issue Dec 15, 2016 · 9 comments

Comments

@amittel
Copy link
Contributor

amittel commented Dec 15, 2016

Just look at the log and found this error occuring at cron times.

Nextcloud 11.0.0 (stable)
Apps: Contacts, Calendar, News
MySQL: Localhost MySQL - (Debian) 5.5.53-0+deb8u1
Encryption: No

Timestamps of error

2016-12-15T09:45:06+0100
2016-12-15T09:15:07+0100
2016-12-15T08:45:02+0100
2016-12-15T08:15:01+0100
2016-12-15T07:45:02+0100
Error while running background job (Doctrine\DBAL\Exception\SyntaxErrorException): An exception occurred while executing 'DELETE FROM `oc_activity_mq` WHERE `amq_timestamp` <= ? AND `amq_affecteduser` IN ()' with params [1481784301]: SQLSTATE[42000]: Syntax error or access violation:   1064 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 ')' at line 1
OCA\Activity\BackgroundJob\EmailNotification ):
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php - line 178: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'DELETE FROM `oc...', Array)
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/apps/activity/lib/MailQueueHandler.php - line 334: Doctrine\DBAL\Statement->execute(Array)
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/apps/activity/lib/BackgroundJob/EmailNotification.php - line 131: OCA\Activity\MailQueueHandler->deleteSentItems(Array, 1481784301)
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/apps/activity/lib/BackgroundJob/EmailNotification.php - line 81: OCA\Activity\BackgroundJob\EmailNotification->runStep(500, 1481784301)
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/lib/private/BackgroundJob/Job.php - line 53: OCA\Activity\BackgroundJob\EmailNotification->run(NULL)
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/lib/private/BackgroundJob/TimedJob.php - line 54: OC\BackgroundJob\Job->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
/media/f147882d-b410-4463-873b-e1b81659918a/www/cloud/cron.php - line 121: OC\BackgroundJob\TimedJob->execute(Object(OC\BackgroundJob\JobList), Object(OC\Log))
{main}

The only thing changing is the number in params [1481786100]

@LukasReschke
Copy link
Member

cc @nickvergessen

@nickvergessen
Copy link
Member

Fix is in nextcloud/activity#94

@amittel
Copy link
Contributor Author

amittel commented Dec 15, 2016

Ok, thanks.
I'll apply it and see if it works.

@nrgeen
Copy link

nrgeen commented Dec 15, 2016

@amittel Does it work?
I have the same problem and it slows down my system pretty much!
Particularly affected by this seems to be any login procedure and syncronization.

@amittel
Copy link
Contributor Author

amittel commented Dec 15, 2016

Yes, just checked my log and no errors anymore.

@nrgeen
Copy link

nrgeen commented Dec 15, 2016

Excuse the question, but have you just exchanged the file "MailQueueHandler.php" or how did you proceed?

@amittel
Copy link
Contributor Author

amittel commented Dec 15, 2016

Yes, you can just copy the new file or edit the file with the changes from the pull request.
I edited the file https://github.com/nextcloud/activity/pull/94/files

@techc0de
Copy link

techc0de commented Dec 16, 2016

Hi,

I having the same error after updated to NC11 from 10.0.2.
So, I just copy & paste the fix into my current MailQueueHandler.php?

@nickvergessen
Copy link
Member

@tx7 yes

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

No branches or pull requests

5 participants