Project

General

Profile

Actions

Bug #1497

closed

Lighttpd upload hangs in freebsd 6.2.

Added by Anonymous almost 17 years ago. Updated about 16 years ago.

Status:
Invalid
Priority:
Urgent
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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

Actions #1

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

Actions #2

Updated by Anonymous almost 17 years ago

#
  1. LIGHTTPd CLUSTER CONFIGURATION FILE # # # #
  1. 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"

  1. modules to load
  1. at least mod_access and mod_accesslog should be loaded
  2. all other module should only be loaded if really neccesary
  3. - saves some time
  4. - saves memory
    server.modules = (
    "mod_rewrite",
    #"mod_evasive",
    #"mod_magnet",
    "mod_redirect",
    "mod_alias",
    "mod_access",
  5. "mod_auth",
    "mod_status",
  6. "mod_setenv",
    "mod_fastcgi",
  7. "mod_proxy",
    "mod_simple_vhost",
  8. "mod_evhost",
  9. "mod_userdir",
    "mod_cgi", #DJ MILLER + PHOTOS
  10. "mod_compress",
  11. "mod_ssi",
  12. "mod_usertrack",
  13. "mod_expire",
  14. "mod_secdownload",
  15. "mod_rrdtool",
    "mod_accesslog"
    )
  1. a static document-root, for virtual-hosting take look at the
  2. server.virtual-* options
    server.document-root = "/home/photos/"
  1. where to send error-messages to
    server.errorlog = "/home/error.log"
  1. files to check for if .../ is requested
    server.indexfiles = ( "index.php", "index.html",
    "index.htm", "index.pxml", "default.htm","main.html" )
  1. 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"
    )
  1. Use the "Content-Type" extended attribute to obtain mime type if possible
    #mimetypes.use-xattr = "enable"
  1. send a different Server: header
  2. be nice and keep it at lighttpd
    server.tag = "NPWS - pwrd by lighttpd.net"
  1. accesslog module
    accesslog.filename = "/var/log/lighttpd.access.log"
    #accesslog.filename = "/dev/null"
  1. deny access the file-extensions #
  1. ~ is for backupfiles from vi, emacs, joe, ...
  2. .inc is often used for code includes which should in general not be part
  3. of the document-root
    url.access-deny = ( "~", ".inc" )
  1. Options that are good to be but not neccesary to be changed #######
  1. bind to port (default: 80)
    server.port = 80
  1. bind to localhost (default: all interfaces)
    #server.bind = "89.188.102.66"
  1. error-handler for status 404
    #server.error-handler-404 = "/error-handler.html"
    #server.error-handler-404 = "/error-handler.php"
  1. to help the rc.scripts
    server.pid-file = "/var/run/lighttpd.pid"
  1. virtual hosts ##
  1. If you want name-based virtual hosting add the next three settings and load
  2. mod_simple_vhost ##
  3. document-root =
  4. virtual-server-root + virtual-server-default-host + virtual-server-docroot
  5. or
  6. 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"

##
  1. Format: <errorfile-prefix><status-code>.html
  2. > ..../status-404.html for 'File not found'
    #server.errorfile-prefix = "weigon/projects/lighttpd/doc/status
    "
  1. virtual directory listings
    #server.dir-listing = "enable"
  1. enable debugging
    #debug.log-request-header = "enable"
    #debug.log-response-header = "enable"
    #debug.log-request-handling = "enable"
    #debug.log-file-not-found = "enable"
  1. only root can use these options #
  1. chroot() to directory (default: no chroot() )
    #server.chroot = "/home/"
  1. change uid to <uid> (default: don't care)
    server.username = "web"
  1. change uid to <uid> (default: don't care)
    server.groupname = "web"
  1. compress module
    #compress.cache-dir = "/tmp/lighttpd/cache/compress/"
    #compress.filetype = ("text/plain", "text/html")
  1. proxy module
  1. read proxy.txt for more info
    #proxy.server = ( ".php" =>
  1. ( "localhost" =>
  2. (
  3. "host" => "192.168.0.101",
  4. "port" => 80
  5. )
  6. )
  7. )
  1. fastcgi module
  1. read fastcgi.txt for more info
    fastcgi.server = ( ".php" =>
    ( "localhost" =>
    (
    "socket" => "/tmp/php.sock",
  1. "bin-path" => "/usr/local/fastphp/bin/php-cgi",
  2. "host" => "127.0.0.1", # "port" => 1026
    )
    )
    )

    status.status-url = "/server-status"
    status.statistics-url = "/server-statistics"

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

Updated by glen almost 17 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid
Actions #7

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom