Skip to content

Instantly share code, notes, and snippets.

View ipconfiger's full-sized avatar

压力很大同志 ipconfiger

View GitHub Profile
Traceback (most recent call last):
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/gevent/wsgi.py", line 114, in handle
result = self.server.application(env, self.start_response)
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 275, in __call__
signals.request_finished.send(sender=self.__class__)
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 172, in send
response = receiver(signal=self, sender=sender, **named)
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/db/__init__.py", line 85, in close_connection
conn.close()
File "/home/www/.virtualenvs/django13/lib/python2.7/site-packages/django/db/backends/__init__.py", line 244, in close
location / {
  proxy_pass_header Server;
  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Scheme $scheme;
  proxy_pass http://frontends;
  proxy_next_upstream error;
}
upstream frontends {
  server 127.0.0.1:8001;
  server 127.0.0.1:8002;
  server 127.0.0.1:8003;
  server 127.0.0.1:8004;
[program:web]
command=python /var/www/site/Serv.py 80%(process_num)02d
process_name=%(program_name)s_%(process_num)02d
umask=022
startsecs=0
stopwaitsecs=0
redirect_stderr=true
stdout_logfile=/tmp/codoon.log
numprocs=4
numprocs_start=1
__author__ = 'alexander'
import os
import sys
from tornado.options import options, define, parse_command_line
import django.core.handlers.wsgi
import tornado.httpserver
import tornado.ioloop
import tornado.web
import tornado.wsgi
class Blog(DynamicBase):
title=Column(unicode,max_length=200)
content=Column(unicode)
post_date=Column(datetime.datetime,db_index=True)
auther=FkColumn(User)
class Meta:
table_name="blogs"
connection=connections[DB]
import time
proxies = {}
class _ConnectionWrapper(object):
def __init__(self,conn):
self.conn=conn
def close(self):
pass
import time
proxies = {}
class _ConnectionWrapper(object):
def __init__(self,conn):
self.conn=conn
def close(self):
pass
proxies = {}
class _ConnectionWrapper(object):
"""
用来包装Connection的类
"""
def __init__(self,conn):
self.conn=conn
def close(self):
try:
import MySQLdb as Database
Database = pool.manage(Database)
except ImportError, e:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)