Re: DatabaseError: execute used with asynchronous query
Just to wrap up, I describe a fix here: http://www.manasupo.com/2012/03/geventpsycopg2-execute-cannot-be-used.html Cheers, Daniel On Feb 28, 4:25 pm, j_syk wrote: > As far as I remember, I quickly switched back to 'sync' worker type (the > default) for the app which had this problem. I've never seen the error > again. I have another project running on eventlet, still with gunicorn, > postgres, and psycopg2. Never have had any problems with that one. So maybe > it is a problem with gevent. > > I'd like to hear from someone who has had success with gevent. > > > > > > > > On Tuesday, February 28, 2012 7:34:03 AM UTC-6, Daniel Svonava wrote: > > > Hi, this same error happened to me as well. My setup: > > > Django==1.3.1 > > gevent==0.13.6 > > greenlet==0.3.4 > > gunicorn==0.13.4 > > psycopg2==2.4.4 > > > I use this function to make psycopg2 "green" (in the gunicorn config): > > > worker_class = "gevent" > > def def_post_fork(server, worker): > > from psyco_gevent import make_psycopg_green > > make_psycopg_green() > > worker.log.info("Made Psycopg Green") > > post_fork = def_post_fork > > > This is making me worried of using the Gunicorn+Gevent+psycopg2 combo. > > > Cheers, > > Daniel > > > On Friday, January 20, 2012 3:46:47 PM UTC+1, j_syk wrote: > > >> I was testing one my apps today with a form that features a drop-down > >> field that initiates a json lookup for additional detail. You choose a > >> location, it populates address fields. It's been working for weeks. > >> Today, when I clicked an entry, the target detail field didn't change. > > >> I have debug off, so instantly I feel my phone buzz and I've been sent > >> a http500 report e-mail with the following message- > > >> DatabaseError: execute cannot be used while an asynchronous query is > >> underway > > >> I can't seem to reproduce the error, it's never happened before, and I > >> haven't changed this piece of code for a while, so I doubt it's > >> something new. > > >> I'm willing to write it off as a fluke, but at the same time I'd like > >> to learn more and the search results on the topic don't seem good. > > >> Server setup is Django 1.3.1, Gunicorn 0.13 with geventlet processes, > >> Nginx 0.7, postgres 8.4.8, > >> That particular page was using Jquery and a .getJSON call to a json > >> output produced by a django view which calls a basic query. > > >> What should I know about the "asynchronous query" error? Are there > >> ways to prevent it? Should I be worried? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: DatabaseError: execute used with asynchronous query
As far as I remember, I quickly switched back to 'sync' worker type (the default) for the app which had this problem. I've never seen the error again. I have another project running on eventlet, still with gunicorn, postgres, and psycopg2. Never have had any problems with that one. So maybe it is a problem with gevent. I'd like to hear from someone who has had success with gevent. On Tuesday, February 28, 2012 7:34:03 AM UTC-6, Daniel Svonava wrote: > > Hi, this same error happened to me as well. My setup: > > Django==1.3.1 > gevent==0.13.6 > greenlet==0.3.4 > gunicorn==0.13.4 > psycopg2==2.4.4 > > I use this function to make psycopg2 "green" (in the gunicorn config): > > worker_class = "gevent" > def def_post_fork(server, worker): > from psyco_gevent import make_psycopg_green > make_psycopg_green() > worker.log.info("Made Psycopg Green") > post_fork = def_post_fork > > > This is making me worried of using the Gunicorn+Gevent+psycopg2 combo. > > Cheers, > Daniel > > On Friday, January 20, 2012 3:46:47 PM UTC+1, j_syk wrote: >> >> I was testing one my apps today with a form that features a drop-down >> field that initiates a json lookup for additional detail. You choose a >> location, it populates address fields. It's been working for weeks. >> Today, when I clicked an entry, the target detail field didn't change. >> >> I have debug off, so instantly I feel my phone buzz and I've been sent >> a http500 report e-mail with the following message- >> >> >> DatabaseError: execute cannot be used while an asynchronous query is >> underway >> >> >> I can't seem to reproduce the error, it's never happened before, and I >> haven't changed this piece of code for a while, so I doubt it's >> something new. >> >> I'm willing to write it off as a fluke, but at the same time I'd like >> to learn more and the search results on the topic don't seem good. >> >> Server setup is Django 1.3.1, Gunicorn 0.13 with geventlet processes, >> Nginx 0.7, postgres 8.4.8, >> That particular page was using Jquery and a .getJSON call to a json >> output produced by a django view which calls a basic query. >> >> What should I know about the "asynchronous query" error? Are there >> ways to prevent it? Should I be worried? > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/yrBK5DVnN30J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: DatabaseError: execute used with asynchronous query
Hi, this same error happened to me as well. My setup: Django==1.3.1 gevent==0.13.6 greenlet==0.3.4 gunicorn==0.13.4 psycopg2==2.4.4 I use this function to make psycopg2 "green" (in the gunicorn config): worker_class = "gevent" def def_post_fork(server, worker): from psyco_gevent import make_psycopg_green make_psycopg_green() worker.log.info("Made Psycopg Green") post_fork = def_post_fork This is making me worried of using the Gunicorn+Gevent+psycopg2 combo. Cheers, Daniel On Friday, January 20, 2012 3:46:47 PM UTC+1, j_syk wrote: > > I was testing one my apps today with a form that features a drop-down > field that initiates a json lookup for additional detail. You choose a > location, it populates address fields. It's been working for weeks. > Today, when I clicked an entry, the target detail field didn't change. > > I have debug off, so instantly I feel my phone buzz and I've been sent > a http500 report e-mail with the following message- > > > DatabaseError: execute cannot be used while an asynchronous query is > underway > > > I can't seem to reproduce the error, it's never happened before, and I > haven't changed this piece of code for a while, so I doubt it's > something new. > > I'm willing to write it off as a fluke, but at the same time I'd like > to learn more and the search results on the topic don't seem good. > > Server setup is Django 1.3.1, Gunicorn 0.13 with geventlet processes, > Nginx 0.7, postgres 8.4.8, > That particular page was using Jquery and a .getJSON call to a json > output produced by a django view which calls a basic query. > > What should I know about the "asynchronous query" error? Are there > ways to prevent it? Should I be worried? On Friday, January 20, 2012 3:46:47 PM UTC+1, j_syk wrote: > > I was testing one my apps today with a form that features a drop-down > field that initiates a json lookup for additional detail. You choose a > location, it populates address fields. It's been working for weeks. > Today, when I clicked an entry, the target detail field didn't change. > > I have debug off, so instantly I feel my phone buzz and I've been sent > a http500 report e-mail with the following message- > > > DatabaseError: execute cannot be used while an asynchronous query is > underway > > > I can't seem to reproduce the error, it's never happened before, and I > haven't changed this piece of code for a while, so I doubt it's > something new. > > I'm willing to write it off as a fluke, but at the same time I'd like > to learn more and the search results on the topic don't seem good. > > Server setup is Django 1.3.1, Gunicorn 0.13 with geventlet processes, > Nginx 0.7, postgres 8.4.8, > That particular page was using Jquery and a .getJSON call to a json > output produced by a django view which calls a basic query. > > What should I know about the "asynchronous query" error? Are there > ways to prevent it? Should I be worried? On Friday, January 20, 2012 3:46:47 PM UTC+1, j_syk wrote: > > I was testing one my apps today with a form that features a drop-down > field that initiates a json lookup for additional detail. You choose a > location, it populates address fields. It's been working for weeks. > Today, when I clicked an entry, the target detail field didn't change. > > I have debug off, so instantly I feel my phone buzz and I've been sent > a http500 report e-mail with the following message- > > > DatabaseError: execute cannot be used while an asynchronous query is > underway > > > I can't seem to reproduce the error, it's never happened before, and I > haven't changed this piece of code for a while, so I doubt it's > something new. > > I'm willing to write it off as a fluke, but at the same time I'd like > to learn more and the search results on the topic don't seem good. > > Server setup is Django 1.3.1, Gunicorn 0.13 with geventlet processes, > Nginx 0.7, postgres 8.4.8, > That particular page was using Jquery and a .getJSON call to a json > output produced by a django view which calls a basic query. > > What should I know about the "asynchronous query" error? Are there > ways to prevent it? Should I be worried? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/kPEp1RP8fUQJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.