Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Thursday, April 30, 2020

workaround for MySQL server has gone away error with flask

I had this issue when my flask simple app kept failing the next day it was started.
It kept giving the error "MySQL server has gone away".

I tried a couple of things like, starting the mysql session for every request instead of for each flask process (app-wide). But apparently flask doesn't like that.
At least not when using flaskext.mysql's MySQL.

I think I didn't have much luck trying to change the timeout on flask either, as this module just didn't let me.

I could have changed the module to use mysql, but I didn't have much time to finish the damn thing, so in the end I just set a cron job to access the mysql select query using page every 10 min or so. Ugly, but simple workaround.

It was like
curl -k https://localhost/some_app/index.html

every 10m.

Friday, February 4, 2011

growisofs double layer dvd issue

For some reason using growisofs to burn a dual layer dvd (DVD-DL) was giving me an error that ended with like this line:
:-( write failed: Input/output error growisofs dvd dual layer

The command I used was:
growisofs -Z /dev/scd0 -R -J -V "someID" .
It usually works just fine on regular DVDs.
I thought it was only an option for burning ISO files, but apparently using the -dvd-compat option fixes it (it did for me!). So instead of the above command, you'd type:

growisofs -dvd-compat -Z /dev/scd0  -R -J -V "someID" .
And you'll be able to burn a dual layer DVD(8.5GB) with growisofs without any problem.