27 Commits

Author SHA1 Message Date
benoitc
e12f520cea use args for the socket errno 2012-10-25 07:14:53 +02:00
benoitc
60644b12af miscellaneous fixes 2012-10-24 14:24:19 +02:00
benoitc
53ce50bc7b obvious syntax fixes preparing python3 support 2012-10-24 12:11:15 +02:00
benoitc
fa341c6531 pyflakes pass. 2012-02-21 14:53:17 +01:00
benoitc
f168a21dae fix whitespaces 2012-02-19 11:27:46 +01:00
benoitc
953021d449 proper fix. ":w" helps. 2011-08-22 16:43:15 +02:00
benoitc
94f39e9d5e fix unix socket. spotted by @jinzo on irc. Thanks! 2011-08-22 16:38:12 +02:00
benoitc
66f7271c5f Use our own logger object to log events in gunicorn. While I'm here add
the possibility to manage an access log compatible with apache combined
log format. reopening files is also handled. Also, this change fix
issues #237 and #190.

For the sake of simplicity logging file have been removed

--logfile option has become --error-logfile, by default "-"

Following options have been added:

--access-logfile, the access log file path. By default None. If set
access logs will bre written to defined output

eg:

$ gunicorn -w3 --access-logfile=- test:app
2011-08-21 19:36:52 [84572] [INFO] Starting gunicorn 0.13.0
2011-08-21 19:36:52 [84572] [INFO] Listening at: http://127.0.0.1:8000
(84572)
2011-08-21 19:36:52 [84572] [INFO] Using worker: sync
2011-08-21 19:36:52 [84573] [INFO] Booting worker with pid: 84573
2011-08-21 19:36:52 [84574] [INFO] Booting worker with pid: 84574
2011-08-21 19:36:52 [84575] [INFO] Booting worker with pid: 84575
127.0.0.1 - - [21/Aug/2011:19:37:04] "GET / HTTP/1.1" 200 14 "-"
"curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r
zlib/1.2.5"
2011-08-21 21:08:58 +02:00
WoLpH
179b87639c removed python string formatting from logging to enable log message grouping 2011-05-11 23:11:36 +02:00
benoitc
09e243d6f6 ipv6 support in gunicorn. fix ticket #107. 2010-11-20 21:04:03 +01:00
benoitc
d37f0a6555 "Yep. Delete it" . fix issue #82. opening a ticket with a not for this
change so if someone figures how to use TCP_CORK or TCP_NOPUSH we can
track it.
2010-08-12 21:22:09 +02:00
benoitc
b2a97e4622 wait a little, depending on the system, the socket took some time to be
released. Solve error I have when testing and going back to old address
too fast.
2010-06-17 17:12:55 +02:00
benoitc
a4fdb93757 just reload config and stay in the loop. 2010-06-17 15:55:45 +02:00
benoitc
72c82a85ef fix issue #59. 2010-05-25 15:13:33 +02:00
Paul J. Davis
036f8b50d9 Major refactor of the configuration mechanics.
* All configuration and bootup is handled by the Application objects.

* There is now a strict ordering on the precedence of configuration
settings:

  1. Each option is given a default value of some sort in options.ini

  2. Any detectable framework configuration settings override the hard
     coded defaults for options. Currently, only Paster applications
     have support for this.

  3. Anything that is specified in a Gunicorn configuration file (by
     default gunicorn.conf.py) overrides what was possibly set by a
     framework specific configuration source.

  4. Anything specified on the command line reins supreme. The command
     line is the final authority on a given configuration option.
     Though, not all configuration options are available via command
     line.

* Configuration metadata is pulled from an options.ini. In the future I'll
use this to build the example gunicorn.conf.py and the config.rst file
in docs/site/config.rst.

I haven't tested the differences thoroughly. The next item on my agenda
is to figure out a way to start testing Gunicorn that doesn't make my
eyes bleed.
2010-05-19 13:39:37 -04:00
benoitc
562c9a2d70 revert previous change 2010-03-13 23:25:29 +01:00
benoitc
d21254edfc update readme 2010-03-13 23:21:42 +01:00
benoitc
68d1542c20 timeout and backlog can now be configured in config file. we should put
more options. Also the default of backlog could be 1024 instead of 2048.
2010-03-03 16:03:23 +01:00
benoitc
47f755df9d SERVER_PORT should be a string. spotted by lericson on irc. while i'm
here fix tcp bind
2010-02-22 17:02:25 +01:00
benoitc
386fbd6e13 fix umask so we use it only when creating socket. 2010-02-22 16:52:32 +01:00
Paul J. Davis
b995b5a672 REUSEADDR needs to be set before bind()'ing. 2010-02-20 16:39:49 -05:00
Benoit Chesneau
56e1d90ab6 close tmp in the right place. 2010-02-17 13:32:43 +01:00
Benoit Chesneau
95f6ce5618 remove useless print and revert last commit 2010-02-16 15:43:41 +01:00
Benoit Chesneau
13d9288d69 refactor config and put all in config object 2010-02-16 10:08:07 +01:00
Benoit Chesneau
330e945c7a license header 2010-02-15 14:54:21 +01:00
Paul J. Davis
e63bd7b843 Use getsockname for logging TCP socket info.
When a user wants the kernel to choose a random port we need to display
which port was chosen.
2010-02-15 14:53:32 +01:00
Paul J. Davis
61b31994d1 Refactored the socket creation code. 2010-02-15 14:53:32 +01:00