Bug #1497
closedLighttpd upload hangs in freebsd 6.2.
Description
I have upgraded to freebsd 6.2 and installed lighttpd 1.4.18_1 from the latest ports.
I have noticed, that when I try to upload a file, the upload just hangs.
I look into the /server-status and it says
195.128.48.49 0/0 0/0 readpost 19 (/t.htm?uploadhash=)
(mind the reapost status).
I looked into /tmp and I saw the lighttpd-upload-something file in there (which dissapears after a while).
I tried
server.network-backend = "writev" and server.network-backend = "write" same result.
I tried with server.event-handler = "freebsd-kqueue" and without server.event-handler. Same result.
This happens on absolutely every file, small or big. Although, if I don't select a file, the upload form submits normally.
My config goes attached.
-- eth
Updated by Anonymous almost 17 years ago
This has nothing to do with FastCGI or any other module. I tried plain file uploading through /t.htm to /t.htm
Updated by Anonymous almost 17 years ago
- LIGHTTPd CLUSTER CONFIGURATION FILE # # # #
- Options you really have to take care of ####################
server.max-fds = 2048
server.max-keep-alive-requests = 128
server.max-keep-alive-idle = 30
server.max-read-idle = 60
server.max-write-idle = 360
server.range-requests="enable"
#net.ipv4.tcp_wmem = 4096 65536 524288
#net.core.wmem_max = 1048576
#server.max-connections=5
#fastcgi.debug=1
server.upload-dirs = ( "/tmp" )
#server.event-handler = "freebsd-kqueue"
#server.network-backend = "writev"
- modules to load
- at least mod_access and mod_accesslog should be loaded
- all other module should only be loaded if really neccesary
- - saves some time
- - saves memory
server.modules = (
"mod_rewrite",
#"mod_evasive",
#"mod_magnet",
"mod_redirect",
"mod_alias",
"mod_access", - "mod_auth",
"mod_status", - "mod_setenv",
"mod_fastcgi", - "mod_proxy",
"mod_simple_vhost", - "mod_evhost",
- "mod_userdir",
"mod_cgi", #DJ MILLER + PHOTOS - "mod_compress",
- "mod_ssi",
- "mod_usertrack",
- "mod_expire",
- "mod_secdownload",
- "mod_rrdtool",
"mod_accesslog"
)
- a static document-root, for virtual-hosting take look at the
- server.virtual-* options
server.document-root = "/home/photos/"
- where to send error-messages to
server.errorlog = "/home/error.log"
- files to check for if .../ is requested
server.indexfiles = ( "index.php", "index.html",
"index.htm", "index.pxml", "default.htm","main.html" )
- mimetype mapping
mimetype.assign = (
".pls" => "audio/x-scpls",
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "audio/x-wav",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar"
)
- Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetypes.use-xattr = "enable"
- send a different Server: header
- be nice and keep it at lighttpd
server.tag = "NPWS - pwrd by lighttpd.net"
- accesslog module
accesslog.filename = "/var/log/lighttpd.access.log"
#accesslog.filename = "/dev/null"
- deny access the file-extensions #
- ~ is for backupfiles from vi, emacs, joe, ...
- .inc is often used for code includes which should in general not be part
- of the document-root
url.access-deny = ( "~", ".inc" )
- Options that are good to be but not neccesary to be changed #######
- bind to port (default: 80)
server.port = 80
- bind to localhost (default: all interfaces)
#server.bind = "89.188.102.66"
- error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
- to help the rc.scripts
server.pid-file = "/var/run/lighttpd.pid"
- virtual hosts ##
- If you want name-based virtual hosting add the next three settings and load
- mod_simple_vhost ##
- document-root =
- virtual-server-root + virtual-server-default-host + virtual-server-docroot
- or
- virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "photos/"
#simple-vhost.default-host = "img0.nightparty.ru"
#simple-vhost.document-root = ""
include "lighttpd.sites.conf"
##- Format: <errorfile-prefix><status-code>.html
> ..../status-404.html for 'File not found'"
#server.errorfile-prefix = "weigon/projects/lighttpd/doc/status
- virtual directory listings
#server.dir-listing = "enable"
- enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"
- only root can use these options #
- chroot() to directory (default: no chroot() )
#server.chroot = "/home/"
- change uid to <uid> (default: don't care)
server.username = "web"
- change uid to <uid> (default: don't care)
server.groupname = "web"
- compress module
#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
#compress.filetype = ("text/plain", "text/html")
- proxy module
- read proxy.txt for more info
#proxy.server = ( ".php" =>
- ( "localhost" =>
- (
- "host" => "192.168.0.101",
- "port" => 80
- )
- )
- )
- fastcgi module
- read fastcgi.txt for more info
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php.sock",
- "bin-path" => "/usr/local/fastphp/bin/php-cgi",
- "host" => "127.0.0.1",
# "port" => 1026
)
)
)status.status-url = "/server-status"
status.statistics-url = "/server-statistics"
Updated by Anonymous almost 17 years ago
(sorry, but the file attachment in TRAC doesn't work, so I had to post the config here).
Updated by Anonymous almost 17 years ago
the only thing trace shows for this request is...
ioctl(8, FIONREAD, r2037540204) = 0
read(8, "POST http://gallery.ru/t.htm?upl"..., 2047) = 872
kevent(0x7, 0xbfbfe550, 0x1, 0, 0, 0xbfbfe548) = 0
gettimeofday({1751409007, 1030255457}, NULL) = 0
kevent(0x7, 0, 0, 0x80b2000, 0x7f7, 0xbfbfe9e0) = 1
ioctl(8, FIONREAD, r1414809632) = 0
break(0x81fa000) = 0
read(8, "-----------------------------7d7"..., 2943) = 2920
and nothing else... (except the gettimeofday ticks every second).
Updated by Anonymous almost 17 years ago
Problem solved, this was due to incorrect tcp/ip packet policy of freebsd.
Recompiling freebsd with altq support and turning on pf (packet filter) solved the problem.
Details in http://www.bsdforums.org/forums/showthread.php?p=282451
Updated by glen almost 17 years ago
- Status changed from New to Fixed
- Resolution set to invalid
Also available in: Atom