Tests about a simple python3 fastcgi runner using libfcgi and the Python-C API.
python
c
wsgi
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pyfcgi.1 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. .TH "pyfcgi" 1 "Mon Oct 28 2019" "Version 0.0.1" "PyFCGI" \" -*- nroff -*-
  2. .ad l
  3. .nh
  4. .SH NAME
  5. pyfcgi \- Python Fast CGI runner
  6. .SH "SYNOPSIS"
  7. .PP
  8. spawn-fcgi [OPTS] -- pyfcgi [OPTIONS]
  9. .SH "DESCRIPTION"
  10. .PP
  11. Run WSGI python application in a pool of worker\&.
  12. .SH "OPTIONS"
  13. .PP
  14. .SS "spawn-fcgi OPTIONS"
  15. OPTS are \fBspawn-fcgi(1)\fP options\&.
  16. .SS "General OPTIONS"
  17. \fB-h --help\fP
  18. .RS 4
  19. Display help and exit
  20. .RE
  21. .PP
  22. \fB-V --version\fP
  23. .RS 4
  24. Display pyfcgi and Python version and exit
  25. .RE
  26. .PP
  27. \fB-C --config=FILE\fP
  28. .RS 4
  29. load a configuration file
  30. .RE
  31. .PP
  32. \fB-l --listen=SOCK_PATH\fP
  33. .RS 4
  34. fcgi listen socket path\&. For TCP socket use 'IPv4:PORT' syntax ( '127\&.0\&.0\&.1:9000' by default)
  35. .RE
  36. .PP
  37. \fB-e --pymodule=MODULE_NAME\fP
  38. .RS 4
  39. python entrypoint module name
  40. .RE
  41. .PP
  42. \fB-E --pyapp=FUNC_NAME\fP
  43. .RS 4
  44. python entrypoint function name
  45. .RE
  46. .PP
  47. \fB-A --alt-io\fP
  48. .RS 4
  49. use stdout to communicate with web server instead of entrypoint return as specified in PEP333
  50. .RE
  51. .PP
  52. \fB-P --pid-file=PATH\fP
  53. .RS 4
  54. Create a pidfile with master process PID
  55. .RE
  56. .PP
  57. .SS "Worker pool OPTIONS"
  58. \fB-w --min-worker\fP
  59. .RS 4
  60. minimum worker in the pool
  61. .RE
  62. .PP
  63. \fB-W --max-worker\fP
  64. .RS 4
  65. maximum worker in the pool
  66. .RE
  67. .PP
  68. \fB-f --fast-spawn\fP
  69. .RS 4
  70. If not given there is at least 1s between two child creation\&. When given childs may be spawned in small burst\&.
  71. .RE
  72. .PP
  73. \fB-t --timeout=SECONDS\fP
  74. .RS 4
  75. Request timeout\&. If the timeout expires the worker process is restarted\&.
  76. .RE
  77. .PP
  78. .SS "Logging & monitoring OPTIONS"
  79. \fB-L --log=LOGGERSPEC\fP
  80. .RS 4
  81. Add a logfile using syntax 'LOGFILE[;FILT][;FMT]' See \fBLogfile format\fP
  82. .RE
  83. .PP
  84. \fB-S --syslog\fP
  85. .RS 4
  86. Use syslog for logging
  87. .RE
  88. .PP
  89. \fB-v --verbose\fP
  90. .RS 4
  91. Send all loglines on STDERR
  92. .RE
  93. .PP
  94. \fB-s --socket-server=SOCKURL\fP
  95. .RS 4
  96. Indicate a socket like 'tcp://localhost:8765' to listen on, replying status and statistics\&. See \fBStatistics socket URL format\fP
  97. .RE
  98. .PP
  99. .SH "Logfile format"
  100. .PP
  101. A logger specification use the following format : LOGILE[;FILT][;FMT] with
  102. .IP "\(bu" 2
  103. LOGFILE the logfile name
  104. .IP "\(bu" 2
  105. FILT a number (in decimal or hex 0xHH) indicating wich facility/level to log
  106. .IP "\(bu" 2
  107. FMT the logline format, following the markup format described bellow
  108. .PP
  109. .SS "Logline format"
  110. Logline's format is indicated using a simple format using fields between '{' and '}'\&. Supported fields are :
  111. .IP "\(bu" 2
  112. {datetime} {datetime:SIZE} {datetime:SIZE:FMT} defines a format and a constant length for a datetime field\&. Default : {datetime:25:F Tz}
  113. .IP "\(bu" 2
  114. {level} the loglevel
  115. .IP "\(bu" 2
  116. {facility} the log facility
  117. .IP "\(bu" 2
  118. {pid} the process PID
  119. .IP "\(bu" 2
  120. {ident} the process ident (friendly name)
  121. .IP "\(bu" 2
  122. {msg} the log message (can appear only once)
  123. .PP
  124. .PP
  125. Specials chars '{' & '}' can be escpaed using '{{' and '}}', and all field names can be abreviated to one character\&.
  126. .SH "Statistics socket URL format"
  127. .PP
  128. Statistics server listen on a socket specified by an URL like :
  129. .PP
  130. PROT://HOST:[PORT] with PROT one of :
  131. .IP "\(bu" 2
  132. tcp with HOST a valid INET address
  133. .IP "\(bu" 2
  134. udp with HOST a valid INET address
  135. .IP "\(bu" 2
  136. unix with HOST a valid PATH
  137. .PP
  138. .SH "EXAMPLES"
  139. .PP
  140. To run foo_pep333\&.entrypoint() PEP333 application :
  141. .PP
  142. spawn-fcgi -d \&. -n -p 9000 -a 127\&.0\&.0\&.1 -- src/pyfcgi -S -e foo_pep333 -E entrypoint
  143. .PP
  144. Logfile example :
  145. .PP
  146. spawn-fcgi -d \&. -n -p 9000 -a 127\&.0\&.0\&.1 -- src/pyfcgi -S -e foo_pep333 -E entrypoint -L '/tmp/foo\&.log;0xff;{datetime} {msg} {ident}'
  147. .SH "AUTHOR"
  148. .PP
  149. Written by Yann Weber <yann.weber@member.fsf.org>
  150. .SH "COPYRIGHT"
  151. .PP
  152. Copyright @ 2019 Yann Weber License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licences/gpl.html>\&.
  153. .PP
  154. This is free software: you are free to change and redistribute it\&. There is NO WARRANTY, to extent permitted by law\&.
  155. .SH "See Also"
  156. .PP
  157. \fBspawn-fcgi(1)\fP
  158. .PP
  159. PyFCGI git repositorie <https://git.yannweb.net/yannweb/pyfcgi>