Getting 500 internal server error on upload

Hi all ,

I have a application where i try to upload a csv file and parse the
input.
I am getting “500 internal server error” after clicking upload.
However the file got uploaded correctly at the destination location. I
am using Lighttpd - FastCGI server. At looking into the server logs i
found the error was due to “Malformed multipart post”

Form view

<% form_tag ({:controller=>“admin” , :action =>
“csv_upload” }, :multipart => true )do %>
<%=file_field_tag ‘attachment’%>


<%= submit_tag(‘Upload’, :name => ‘submit’) %>

fcgi error.log

2009-01-10 04:13:35: (mod_fastcgi.c.2593) FastCGI-stderr: Malformed
multipart POST
Malformed multipart POST

2009-01-10 04:17:39: (mod_fastcgi.c.1744) connect failed: Connection
refused on

my lighttpd config

server.modules += ( “mod_fastcgi” )
fastcgi.server += ( “dispatch.fcgi” => ( “localhost” => (
“bin-path” => “<%= $root %>/bin/rails_dispatcher.fcgi”,
“socket” => “<%= $root %>/var/state/fcgi-<%= $port %>.sock”,
“check-local” => “disable”,
“mode” => “responder”,
“min-procs” => 1,
“max-procs” => 15,
“idle-timeout” => 300,
“upload-dirs” => “/var/tmp”,
“max-request-size” => 10000 ,
“bin-environment” =>
(
“APOLLO_ROOT” => “<%= $root %>”,
“RAILS_ROOT” => “<%= $root %>/rails-root”,
“RAILS_ENV” => “development”
),
“bin-copy-environment” => ( “” )
)))
fastcgi.debug = 1
debug.log-request-handling = “enable”
server.error-handler-404 = “/rails.fcgi”

Can somebody please help me with the problem ? I have extensive
googling , but unable to find any solution.

Thank you,