Documentation for pulsar 0.4.6. For development docs, go here.
This is the full list of pulsar.Setting available for configuring your pulsar server or application.
Command line: -c,–config
The path to a Pulsar config file.
Only has an effect when specified on the command line or as part of an application specific configuration.
Command line: -w,–workers
The number of workers for handling requests.
If you are using a multi-process concurrency, a number in the the 2-4 x $(NUM_CORES) range should be good. If you are using threads this number can be higher.
Command line: –max-requests
The maximum number of requests a worker will process before restarting.
Any value greater than zero will limit the number of requests a work will process before automatically restarting. This is a simple method to help limit the damage of memory leaks.
If this is set to zero (the default) then the automatic worker restarts are disabled.
Command line: –backlog
The maximum number of concurrent requests. This refers to the number of clients that can be waiting to be served. Exceeding this number results in the client getting an error when attempting to connect. It should only affect servers under significant load.
Must be a positive integer. Generally set in the 64-2048 range.
Command line: -t,–timeout
Workers silent for more than this many seconds are killed and restarted.
Generally set to thirty seconds. Only set this noticeably higher if you’re sure of the repercussions for sync workers. For the non sync workers it just means that the worker process is still communicating and is not tied to the length of time required to handle a single request.
Command line: –debug
Turn on debugging in the server.
This limits the number of worker processes to 1 and changes some error handling that’s sent to clients.
Command line: -D,–daemon
Daemonize the Pulsar process (posix only).
Detaches the server from the controlling terminal and enters the background.
Command line: -p,–pid
A filename to use for the PID file.
If not set, no PID file will be written.
Command line: -u,–user
Switch worker processes to run as this user.
A valid user id (as an integer) or the name of a user that can be retrieved with a call to pwd.getpwnam(value) or None to not change the worker process user.
Command line: -g,–group
Switch worker process to run as this group.
A valid group id (as an integer) or the name of a user that can be retrieved with a call to pwd.getgrnam(value) or None to not change the worker processes group.
Command line: –log-level
The granularity of log outputs.
Valid level names are:
- debug
- info
- warning
- error
- critical
The logging configuration dictionary.
This settings can only be specified on a config file
Command line: -n,–name
A base to use with setproctitle for process naming.
This affects things like ps and top. If you’re going to be running more than one instance of Pulsar you’ll probably want to set a name to tell them apart. This requires that you install the setproctitle module.
It defaults to ‘pulsar’.
Internal setting that is adjusted for each type of application.
Called just after the server is started.
The callable needs to accept a single instance variable for the Arbiter.
Called just before a worker is forked.
The callable needs to accept two instance variables for the Arbiter and new Worker.
Called just after a worker has been forked.
The callable needs to accept two instance variables for the Arbiter and new Worker.
Called just before a new master process is forked.
The callable needs to accept a single instance variable for the Arbiter.
Called just before a worker processes the request.
The callable needs to accept two instance variables for the Worker and the Request.
Called after a worker processes the request.
The callable needs to accept two instance variables for the Worker and the Request.
Called just after a worker has been exited.
The callable needs to accept one variable for the the just-exited Worker.
Called at every event loop by the worker.
The callable needs to accept one variable for the Worker.
Called at every event loop by the arbiter.
The callable needs to accept one variable for the Arbiter.
Setting for pulsar.apps.socket application.
Command line: -b,–bind
The socket to bind.
A string of the form: ‘HOST’, ‘HOST:PORT’, ‘unix:PATH’. An IP is a valid HOST.
Setting for pulsar.apps.socket application.
Command line: –keep-alive
The number of seconds to keep an idle client connection open.
Setting for pulsar.apps.wsgi application.
Command line: –http-parser
The HTTP Parser to use. By default it uses the fastest possible.
Specify python if you wich to use the pure python implementation
Setting for pulsar.apps.wsgi application.
Command line: –response-middleware
Response middleware to add to the wsgi handler
Setting for pulsar.apps.cpubound application.
Command line: -q,–task-queue
The task queue factory to use.
Setting for pulsar.apps.tasks application.
List of python dotted paths where tasks are located.
Setting for pulsar.apps.test application.
Command line: –verbosity
Test verbosity, 0, 1, 2, 3
Setting for pulsar.apps.test application.
Optional test labels to run. If not provided all tests are run.
To see available labels use the -l option.
Setting for pulsar.apps.test application.
Command line: -l,–list_labels
List all test labels without performing tests.