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.7KB

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