Closed ctgcwiqc closed 7 years ago
Have the same problem. Here is log from server: Exception: {"Message":"An exception occurred while executing 'DELETE FROM oc_ocsms_smsdatas WHERE user_id = ? AND smsid = ?' with params [\"Andrea\", 9846]:\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(116): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))\n#1 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Statement.php(172): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'DELETE FROM oc...', Array)\n#2 \/var\/www\/owncloud\/lib\/private\/db\/statementwrapper.php(54): Doctrine\DBAL\Statement->execute(Array)\n#3 \/var\/www\/owncloud\/apps\/ocsms\/db\/smsmapper.php(264): OC_DB_StatementWrapper->execute(Array)\n#4 \/var\/www\/owncloud\/apps\/ocsms\/controller\/apicontroller.php(100): OCA\OcSms\Db\SmsMapper->writeToDB('Andrea', Array)\n#5 [internal function]: OCA\OcSms\Controller\ApiController->push(9767, Array)\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(158): call_user_func_array(Array, Array)\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(86): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\OcSms\Controller\ApiController), 'push')\n#8 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(97): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\OcSms\Controller\ApiController), 'push')\n#9 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(44): OC\AppFramework\App::main('ApiController', 'push', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#10 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#11 \/var\/www\/owncloud\/lib\/private\/route\/router.php(250): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#12 \/var\/www\/owncloud\/lib\/base.php(782): OC\Route\Router->match('\/apps\/ocsms\/pus...')\n#13 \/var\/www\/owncloud\/index.php(36): OC::handleRequest()\n#14 {main}","File":"\/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":115}
Exception: {"Message":"An exception occurred while executing 'DELETE FROM oc_ocsms_smsdatas WHERE user_id = ? AND smsid = ?' with params [\"clint\", 12185]:\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(116): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))\n#1 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Statement.php(172): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'DELETE FROM oc...', Array)\n#2 \/var\/www\/owncloud\/lib\/private\/db\/statementwrapper.php(54): Doctrine\DBAL\Statement->execute(Array)\n#3 \/var\/www\/owncloud\/apps\/ocsms\/db\/smsmapper.php(264): OC_DB_StatementWrapper->execute(Array)\n#4 \/var\/www\/owncloud\/apps\/ocsms\/controller\/apicontroller.php(100): OCA\OcSms\Db\SmsMapper->writeToDB('clint', Array)\n#5 [internal function]: OCA\OcSms\Controller\ApiController->push(12149, Array)\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(158): call_user_func_array(Array, Array)\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(86): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\OcSms\Controller\ApiController), 'push')\n#8 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(97): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\OcSms\Controller\ApiController), 'push')\n#9 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(44): OC\AppFramework\App::main('ApiController', 'push', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#10 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#11 \/var\/www\/owncloud\/lib\/private\/route\/router.php(250): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#12 \/var\/www\/owncloud\/lib\/base.php(782): OC\Route\Router->match('\/apps\/ocsms\/pus...')\n#13 \/var\/www\/owncloud\/index.php(36): OC::handleRequest()\n#14 {main}","File":"\/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":115}
Thats from my OC log
@nerzhul has given up on this app.
Are you serious or joking?
@ctgcwiqc Sorry, a bit sarcastic. Me and @nerzhul had this discussion before. Just feels like he abandoned this project in favor for the other stuff he does in other projects. I just think it's kind of bad that I as a user have to pay for something that isn't updated.
I have been trying to find useful things to pair with my OC server from the apps page, but I am unable to find compatible (updated) apps regularly. I'm starting to second guess my decision to drop Google Drive in favor of OC. I have calendars, contacts, files, everything on OC. I understand your frustration. When you say you pay for something, do you mean the android app?
Hope you are joking. We have paid for android app, so before leaving the project I hope he fixes our problems!
I'm there guys, just a little bit busy IRL because i changed my work. Will work on it next days. I'm preparing the v2 to add msg restauration. For your unhandled HTTP return code, have y ou re-enable thé app ?
delumerlino notifications@github.com a écrit :
Hope you are joking. We have paid for android app, so before leaving the project I hope he fixes our problems!
— Reply to this email directly or view it on GitHub.
Oh thank you. App re-enabled both from OC and Android. On Android cleaned (deleted user data) and reconfigured but nothing changed. I have the error above, but sms are correctly saved on OC.
Can you give me your httpd logs ?
NP, here I am. Thank you
2015-05-13 8:39 GMT+02:00 nerzhul notifications@github.com:
Can you give me your httpd logs ?
— Reply to this email directly or view it on GitHub https://github.com/nerzhul/ocsms/issues/71#issuecomment-101534046.
Sent by mail. TY
@ctgcwiqc First of all. There is nothing wrong with ownCloud. Much better than Google Drive, Dropbox, OneDrive etc. if you ask me. I've been using it since early 2013, and right now we are at a stage where everything is just working so good! With the coming update if 8.1, there will be even more improvements.
I agree that there are many un-serious app developers that´s in for the "easy money" - making money on the ownCloud brand. I don't think @nerzhul is one of them, I'm just frustrated that everything takes such time! I even translated the app to Swedish, and have been giving this app some work because I believed in it, but lately I just uninstalled it because all of the errors.
Btw, you should really try the new Mail app. The final piece of the puzzle to make ownCloud complete. https://www.en0ch.se/owncloud_/owncloud-mail/
Sorry for OT btw.
@delumerlino i don't receive anything by mail :(
The lock wait timeout is very strange, what database backend are you using ?
The Error#9 is a unhandled return code, i think it's a error 500 from your server. I will handle it to tell users to look at their server, at first. The error mentionned is clearly a timeout on the request into your database. What is your backend and how many sms have you got in your database?
@nerzhul sorry, here it is: https://camelot.dtdns.net:16177/owncloud/index.php/s/F1WPZn4TgBXGRoR TY
I cannot look at it at work, will look at it tommorow, thanks
NP, thank you m8
2015-05-18 11:30 GMT+02:00 nerzhul notifications@github.com:
I cannot look at it at work, will look at it tommorow, thanks
— Reply to this email directly or view it on GitHub https://github.com/nerzhul/ocsms/issues/71#issuecomment-102991895.
P Prima di stampare, pensa all'ambiente Think about the environment
Thanks for your update....but I have the same problem with server app 1.4.5 :(
The recent update doesn't fix this problem at this moment, sorry.
Hello guys,
I have exactly the same error. May be it's because I have a large volume of SMS/MMS stored in my phone? May be it's possible to limit only to a customized date to prevent this kind of problem ?
Regards,
Just found this suspect lines in my NginX errors.logs :
2015/08/29 11:49:39 [error] 2015#0: *3397 upstream timed out (110: Connection timed out) while reading response header from upstream, client: XXX.195.244.29, server: cloud.XXX.digital, request: "POST /index.php/apps/ocsms/push?format=json HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock", host: "cloud.XXX.digital"
And I also see the same error as mentioned by @ctgcwiqc:
{"reqId":"H38qDkQMdEqDLmBILXF4","remoteAddr":"XXX.195.244.32","app":"index","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'DELETE FROM oc_ocsms_smsdatas WHERE user_id = ? AND sms_id = ?' with params [\\\"guillaume\\\", 43603]:\\n\\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Statement.php(172): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'DELETE FROM oc_...', Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/db\\\/statementwrapper.php(73): Doctrine\\\\DBAL\\\\Statement->execute(Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/ocsms\\\/db\\\/smsmapper.php(286): OC_DB_StatementWrapper->execute(Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/ocsms\\\/controller\\\/apicontroller.php(103): OCA\\\\OcSms\\\\Db\\\\SmsMapper->writeToDB('guillaume', Array)\\n#5 [internal function]: OCA\\\\OcSms\\\\Controller\\\\ApiController->push(43475, Array)\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(159): call_user_func_array(Array, Array)\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/http\\\/dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\OcSms\\\\Controller\\\\ApiController), 'push')\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(108): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\OcSms\\\\Controller\\\\ApiController), 'push')\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('ApiController', 'push', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#10 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#11 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(274): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(873): OC\\\\Route\\\\Router->match('\\\/apps\\\/ocsms\\\/pus...')\\n#13 \\\/var\\\/www\\\/owncloud\\\/index.php(40): OC::handleRequest()\\n#14 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":115}","level":4,"time":"2015-08-29T12:27:48+02:00","method":"POST","url":"\/index.php\/apps\/ocsms\/push?format=json"}
I'm using MySQL (MariaDB).
It's partially imported (and strangely, it's very very slowdown my Firefox on the SMS page...)
I also tried to set in NginX: fastcgi_read_timeout 1500; proxy_read_timeout 1500;
so 25 minutes to not do a timed out... but strangely this stop after 2/3 minutes.
Regard
@lakano okay, maybe it's due to a huge SMS amount. How many SMS do you have on your phone ?
I don't known the amount, but it's huge yes. And in the OC side, I see some very old SMS imported, the most of them without name (surely old contacts when I sell/buy something on Internet for example) There is some friends, but with conversation stopped since many years...
And the OC SMS app is really slow, it's not usable, slow as if the page loaded all SMS at the same time...
There is a solution to only import SMS from date ? This could be better, I could set for example 6 months ago.
Regards,
@lakano it seems that angular JS is pretty slow why thousands of SMS i will think about a partial loading of SMS using scrolling, i think it could be better
Yep, you could use ngInfiniteScrolling on Angular, it's surely make it better for huge volume :)
@lakano i will look at this later, thanks for the tip :)
I am getting this error a lot more after upgrading to v8.1.1 my OC server can be slow at times I know I have a poor connection on my phone at times
the combination is causing a time out to occur any way to increase the time out when the phone has a slow connection?
hmmm i should look at the lib timeout, but i don't think i can't tune it because i'm behing owncloudlib :s
I suppose the best solution is to add an option to add an option to set a date limit of SMS/MMS to import.
Oh shit! Optionception!
XD jokes away, I think the best thing will be to send the messages in batches, that way you would be able to sync big ammounts of messages over unstable connections, because you can keep track where your sync was interrupted.
Also, set php timeout to infinite if it is safe, until you have a better solution, in the affected code.
@lakano @animalillo there is many ways to do it, but i need to find the good way. Don't hesitate to provide a patch if you have skills to help the project. Atm i'm working (slower) on SMS restauration, but this optimization is also needed and will be done after that.
@animalillo All suggestions & critics are welcome if it's argued ;-) About your proposition, I'm not sure it's a good idea, because if the user have a very huge collection, and need to launch it 42 times for the first import... I'm pretty sure he won't be so patient.
The option could be really easy to integrate, set by default on 10 years in back. Then the user could run without touching this option, or to set a lower value in case of timeout.
@nerzhul Another solution should be:
Then, when we go in the OCSMS app, if an import is waiting:
So, each time you leave or come back in OCSMS, the app continue the job.
@lakano the problem is that SMS is a database on a android phone and it could not be zipped by regular access. Also, we fetch only the right values and generate a JSON. A server with gzip enabled already permit client to do gzipped version of the JSON. But maybe you are right, adding a manual import with a SMS limit (for example 100 per 100) could be good to sync messages manually first time
@nerzhul Currently, on the import, you send all SMS one by one and ask to the server to save it on DB in the same time ?
Because, may be ( need to try ), if you only save all the SMS to a apps/ocsms/import/ folder, this could prevent timeout ?
Then, when we open OCSMS app, if files exists in the import/ folder, just import them one by one in background, so we can leave or go back later on OCSMS and the import will continue.
Surely the best option :)
@lakano currently the sync process ask the server for present message, send the list to client, client read the whole local list and send the missing messages to server, in one message. Server do a big transaction to commit messages to database in one pass. I think we should tell client to send messages with a bulk limit.
@nerzhul Ok I see.
1) May be it's better to only keep the date of the last saved message. Then you known to only copy messages after this date. It's prevent sending a whole list to client or to parse the whole local list on mobile app.
2) The bulk limit do another problem. For a huge collection, a user may be need to run it 42 times to complete.
3) I suppose if you don't make the DB operations in the import, but only after, when we manually go inside the OCSMS app, this should reduce the timeout problem (but may be not totally)
@lakano it's already the case for point 1. But not first time because we don't know that information :) For point 2, no, because the sync will be done 1 time but send multiple bulk limited HTTP requests to bypass HTTP timeout problem
Ok, I see, so if you make bulk limited in multiples HTTP requests this should solve the problem, good point !
@lakano I didn't pretended to seem offensive, just found a bit funny the fact of the repeated option creation, that probably is a little slip while writing the text, and, additionally, propose an option in which backup of all sms will be performed, because this is a backup app, so that's the main point on it, backup all sms. And that is perfect for me. Even if sending sms from the app or some other features would be nice, this is what I expect from this app, to keep a backup of all my SMS on my owncloud instance, because dealing with dead phones it's a bit tricky, and sometimes you need really old messages.
That said, @nerzhul I would like to help you as I have the skills, but I'm afraid I don't have the required time to work on another project right now. Maybe in the future that will be possible, but as for now, I think that providing my ideas about any topics it's the best I can do.
Have a good day ^^
@animalillo no problem, i also have other open source project , this is why i can be slow there :)
FWIW similar error shows when there's an emoticon in one of the texts. Pertinent portion from the OC log...
Exception: {"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing 'INSERT INTO oc_ocsms_smsdatas (user_id, added, lastmodified, sms_flags, sms_date, sms_id,sms_address, sms_msg, sms_mailbox, sms_type) VALUES (?,?,?,?,?,?,?,?,?,?)' with params [\"username\", \"2015-09-20 10:30:18\", \"2015-09-20 10:30:18\", \"11\", \"1442415102558\", 148, \"+13362091499\", \"\ud83d\udc4c\", 0, 1]:\n\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x91\x8C' for column 'sms_msg' at row 1","Code":0,"Trace":" ...... blah blah blah
Deleting the offending text allows syncing.
Owncloud 8.2, fresh install. Android gets Error#9, here is OC log:
Exception: {"Exception":"Doctrine\DBAL\Exception\DriverException","Message":"An exception occurred while executing 'DELETE FROM oc_ocsms_smsdatas WHERE user_id = ? AND smsid = ?' with params [\"Andrea\", 9877]:\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(116): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))\n#1 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Statement.php(172): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'DELETE FROM oc...', Array)\n#2 \/var\/www\/owncloud\/lib\/private\/db\/statementwrapper.php(73): Doctrine\DBAL\Statement->execute(Array)\n#3 \/var\/www\/owncloud\/apps\/ocsms\/db\/smsmapper.php(286): OC_DB_StatementWrapper->execute(Array)\n#4 \/var\/www\/owncloud\/apps\/ocsms\/controller\/apicontroller.php(103): OCA\OcSms\Db\SmsMapper->writeToDB('Andrea', Array)\n#5 [internal function]: OCA\OcSms\Controller\ApiController->push(9601, Array)\n#6 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(159): call_user_func_array(Array, Array)\n#7 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(89): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\OcSms\Controller\ApiController), 'push')\n#8 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(108): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\OcSms\Controller\ApiController), 'push')\n#9 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(45): OC\AppFramework\App::main('ApiController', 'push', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#10 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#11 \/var\/www\/owncloud\/lib\/private\/route\/router.php(282): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#12 \/var\/www\/owncloud\/lib\/base.php(831): OC\Route\Router->match('\/apps\/ocsms\/pus...')\n#13 \/var\/www\/owncloud\/index.php(39): OC::handleRequest()\n#14 {main}","File":"\/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":115}
This lock wait timeout is a real problem on your MySQL/MariaDB servers...
So, suggestions? Lock timeout is already set to 100 secs.... Il 26/Ott/2015 10:03, "nerzhul" notifications@github.com ha scritto:
This lock wait timeout is a real problem on your MySQL/MariaDB servers...
— Reply to this email directly or view it on GitHub https://github.com/nerzhul/ocsms/issues/71#issuecomment-151067449.
No suggestion yet? I think 100 secs is too much time....
100s is a lot yes. How many SMS did it try to sync ?
They are about 8000... Il 28/Ott/2015 15:26, "nerzhul" notifications@github.com ha scritto:
100s is a lot yes. How many SMS did it try to sync ?
— Reply to this email directly or view it on GitHub https://github.com/nerzhul/ocsms/issues/71#issuecomment-151861202.
Ok @delumerlino i think i should change the algorithm to send SMS in a less bulk manner, using for example 1000/1000 messages
Just installed the android app through F-droid. Sync appears to be successful however this error is appearing in a notification on my phone.