But in mysite-mysite-settings.py in DATABASES I dont't have CONN_MAX_AGE and in don't have in my general directory file my.cnf :/ ????
W dniu piątek, 20 czerwca 2014 17:31:10 UTC+2 użytkownik Dariusz Mysior napisał: > > I use pythonanywhere.com Django 1.6 and Python 2.7 I > > and when I write p.save() I had error like below. > > It says something about updating mysql to fix it, but I don't know what > code or shell commands I need to write. > > Can you help me? One person post that he upgrade MySQL to 5.0.27 but I > don't know what is a commend for do this :/..... > > Traceback (most recent call last): > File "<console>", line 1, in <module> > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/models/base.py", > line 545, in save > force_update=force_update, update_fields=update_fields) > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/models/base.py", > line 570, in save_base > with transaction.commit_on_success_unless_managed(using=using, > savepoint=False): > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/transaction.py", > line 280, in __enter__ > connection.set_autocommit(False) > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/backends/__init__.py", > line 340, in set_autocommit > self._set_autocommit(autocommit) > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", > line 461, in _set_autocommit > self.connection.autocommit(autocommit) > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/utils.py", > line 99, in __exit__ > six.reraise(dj_exc_type, dj_exc_value, traceback) > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", > line 461, in _set_autocommit > self.connection.autocommit(autocommit) > File > "/home/daro822/.virtualenvs/django16/local/lib/python2.7/site-packages/MySQLdb/connections.py", > line 243, in autocommit > _mysql.connection.autocommit(self, on) > OperationalError: (2006, 'MySQL server has gone away') > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ac07e598-aa07-4319-b12a-b354b118e61c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

