978 Commits

Author SHA1 Message Date
Randall Leeds
b955407003 better logging on http parse errors
NoMoreData now inherits StopIteration and the StopIteration clause in
the workers logs the reason at debug level.
2011-11-07 14:56:59 -08:00
benoitc
c6f949b56b add Evan Mezeske to the THANKS 2011-10-25 21:55:16 +02:00
Evan Mezeske
3c1f1cb126 Don't call logging functions in the signal handler.
The standard logger uses locking functions which are NOT guaranteed to
be re-entrant [1], so this could (potentially) result in deadlock or a
crash.

[1] http://docs.python.org/library/logging.html Section 15.7.8.
2011-10-25 21:54:26 +02:00
Evan Mezeske
b5622f874b Log critical as critical, not exception.
This prevents weird things from happening when log.critical is called
in a non-except context.  Typically it would result in either 'None'
or the last exception being logged, neither of which is desirable.
2011-10-25 21:54:04 +02:00
Randall Leeds
951da38521 Merge pull request #276 from bgilbert/patch-1
Fix subcommand name in Django run_gunicorn error message
2011-10-19 13:37:09 -07:00
Benjamin Gilbert
f4a2f9fae5 Fix subcommand name in error message 2011-10-19 17:22:43 -03:00
Randall Leeds
3c47b20f03 typo - fix #273 2011-10-11 16:21:47 -07:00
Randall Leeds
58c3c5680d typo 2011-10-05 14:11:55 -07:00
benoitc
fef233dd5d manage multiple headers entry. Rather than waiting for the new HTTP
parser apply this patch now. Thanks @taejo for the patch. close #267
2011-10-05 14:16:41 +02:00
benoitc
f7b14431b9 allows people to set the X-Forwarded-For header key and disable it by
setting an empty string. close #268 . Thanks for the feedback!
2011-10-05 08:07:30 +02:00
benoitc
99d85e9cce make sure that the port is a string. close #271 thanks!! 2011-10-05 06:07:05 +02:00
benoitc
f2d9bf6b77 sync configure options. spotted by @j4mie on github. thanks! 2011-09-29 13:10:18 +02:00
benoitc
3acf75338f add accesslog example 2011-09-28 12:36:43 +02:00
benoitc
64e3ddab0a sync doc 2011-09-23 07:44:12 +02:00
benoitc
e1b516b230 better wording in changelog 2011-09-23 07:43:29 +02:00
benoitc
a4f22037c4 bump to 0.13.4
- fix closerange function on python 2.5 (typo)
2011-09-23 07:39:55 +02:00
Randall Leeds
0c4021d169 fix #262: typo krange -> xrange 2011-09-22 14:09:33 -04:00
benoitc
5dc53947ed sync doc 2011-09-19 23:39:57 +02:00
benoitc
70d61dde82 bump to 0.13.3 2011-09-19 23:38:08 +02:00
benoitc
c46ee03756 update doc 2011-09-19 23:37:40 +02:00
benoitc
860895c03d fix typo 2011-09-19 23:18:18 +02:00
Randall Leeds
4b53236034 fix #245 - try to prevent leaking fds on reexec 2011-09-19 13:42:07 -07:00
Randall Leeds
6bac0216aa add util.closerange using os module or fallback 2011-09-19 13:42:07 -07:00
Randall Leeds
612a895b15 fix up ugly attribute use in ggevent 2011-09-19 13:41:23 -07:00
Randall Leeds
f7dd412bc3 Merge pull request #257 from tilgovi/master
some improvements to gevent code
2011-09-19 13:35:27 -07:00
Randall Leeds
d6915942f7 factor out duplicate gevent-based worker code 2011-09-18 03:50:13 -07:00
Randall Leeds
55de904e9d add access logging for gevent_* workers 2011-09-18 03:50:13 -07:00
Randall Leeds
04680f1020 fix inverted request_time computation 2011-09-18 02:13:01 -07:00
benoitc
2976618dd3 bump to 0.13.2 2011-09-17 11:03:42 +02:00
benoitc
939b261fed update doc & news for 0.13.2 release. 2011-09-17 10:59:50 +02:00
Randall Leeds
105558595b fix #247 - gunicorn doesn't work with Tornado 2.0 2011-09-15 17:49:19 -07:00
Randall Leeds
4633d1aad9 keep graceful shutdown from interrupting workers
When the signal.siginterrupt call is available it can be used to make
interrupted system calls (errno == EINTR) retry transparently whenever
they have not caused any side effects yet (e.g. no data read/written).
It should make shutdown more graceful.

Patch by Jonas Borgström
2011-09-15 16:20:06 -07:00
Kristian Øllegaard
ba730b1f18 In reload_django_settings "re" is used, but not imported.
fix issue #250. Thanks!
2011-09-15 22:13:55 +02:00
benoitc
ea6abf75b2 typo. fix issue #252. 2011-09-12 17:15:45 +02:00
benoitc
f2a44431bd fix logging in sync worker 2011-09-09 02:16:03 +02:00
benoitc
1d353c993b typo . spotted by adamJLev on github thanks! 2011-09-09 02:04:48 +02:00
benoitc
571a5309d1 - add request time support in log access
- make log access format customizable in settings:
- fix logger

To setup a log format use the --access-logformat option.

        By default:

        %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"

        h: remote address
        t: date of the request
        r: status line (ex: GET / HTTP/1.1)
        s: status
        b: response length or '-'
        f: referer
        a: user agent
        T: request time in seconds
        D: request time in microseconds

        You can also pass any WSGI request header as a parameter.
        (ex '%(HTTP_HOST)s').
2011-09-09 01:44:31 +02:00
benoitc
824801d017 make the Logger pluggable. Allows people to use their own logger by
giving to gunicorn an entry point or a module path.
2011-09-09 00:43:00 +02:00
benoitc
2375ca87fe fix issue #244. lats change in post_request arity was breaking some apps
and also wasn't working everywhere. This patch wrap the function if
arity != 3 so we don't have to test its arity each time we use it.
2011-09-09 00:11:02 +02:00
Randall Leeds
4009c942df add Chris Lamb to THANKS 2011-09-08 11:47:37 -07:00
Randall Leeds
0b6a03f9d6 Merge pull request #248 from lamby/master
Add Debian installation instructions.

Thanks Chris Lamb
2011-09-08 11:47:01 -07:00
Randall Leeds
46791fd496 fix #236 - drop debian packaging dir 2011-09-08 11:45:57 -07:00
Kristian Øllegaard
e8aaf84c63 A fix to make the newest gunicorn work with older projects, that doesn't have LOGGING_CONFIG 2011-09-08 10:54:57 +02:00
Chris Lamb
adc39a9adc Add Debian installation instructions.
Signed-off-by: Chris Lamb <lamby@debian.org>
2011-09-07 11:53:07 +01:00
benoitc
ada725fae0 sometimes it return 0 and we need it. 2011-08-25 13:38:30 +02:00
benoitc
c3c695d462 fix typo 2011-08-25 13:38:00 +02:00
benoitc
f4f73b6d09 updated news 2011-08-22 16:46:57 +02:00
benoitc
953021d449 proper fix. ":w" helps. 2011-08-22 16:43:15 +02:00
benoitc
e3617e3b38 bump to 0.13.1. 2011-08-22 16:40:44 +02:00
benoitc
94f39e9d5e fix unix socket. spotted by @jinzo on irc. Thanks! 2011-08-22 16:38:12 +02:00