I am having an issue where I am trying to test a weservice that I wrote by connecting to it from ruby. When I submit my form that calls the webservice it times out. you can see from the lighttpd log that the webservice completes just after the timeout. any ideas? am I doing something wrong? ---- source ---- def validate auth = ActionWebService::Client::Soap.new(AuthApi, " http://localhost:3000/auth/api") if params[:user] if auth.validate(params[:user][:username], params[:user][:password]) flash[:valid] = params[:user][:username] + '' Successfull'' else flash[:valid] = params[:user][:username] + '' Failed'' end end end ---- loghttpd log ---- Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 22:23:46) [GET] Session ID: 2129cb461e45d4a67b014b4d265a9cda Parameters: {"action"=>"validate", "controller"=>"users"} Rendering within layouts/users Rendering users/validate Completed in 0.08427 (11 reqs/sec) | Rendering: 0.00422 (5%) | 200 OK [ http://localhost/users/validate] Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 22:24:02) [POST] Session ID: 2129cb461e45d4a67b014b4d265a9cda Parameters: {"user"=>{"username"=>"testuser", "password"=>"testpass"}, "commit"=>"Validate", "action"=>"validate", "controller"=>"users"} Timeout::Error (execution expired): /usr/local/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'' /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'' /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'' /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'' /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'' /usr/local/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'' /usr/local/lib/ruby/1.8/net/http.rb:1977:in `read_new'' /usr/local/lib/ruby/1.8/net/http.rb:1046:in `request'' /usr/local/lib/ruby/1.8/net/http.rb:840:in `post'' /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:93:in `post'' /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:116:in `start'' /usr/local/lib/ruby/1.8/net/http.rb:545:in `start'' /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:115:in `start'' /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:92:in `post'' /usr/local/lib/ruby/1.8/soap/streamHandler.rb:170:in `send_post'' /usr/local/lib/ruby/1.8/soap/streamHandler.rb:109:in `send'' /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:170:in `route'' /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:141:in `call'' /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call'' /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:232:in `validate'' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/soap_client.rb:61:in `perform_invocation'' /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/base.rb:15:in `method_missing'' /app/controllers/users_controller.rb:60:in `validate'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in `perform_action'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in `process_without_filters'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in `process_without_session_management_support'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in `process'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in `process_request'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:54:in `process!'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi'' /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in `process!'' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in `process!'' /Users/bwyrosdick/rails/authenticate/public/dispatch.fcgi:24 Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error) Processing AuthController#api (for 127.0.0.1 at 2006-05-24 22:25:02) [POST] Session ID: 6615e9cda1cbf643ac216968825c39b7 Parameters: {"<?xml version"=>"\"1.0\" encoding=\"utf-8\" ?>\n<env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"\n xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\">\n <env:Body>\n <n1:Validate xmlns:n1=\"urn:ActionWebService\"\n env:encodingStyle=\" http://schemas.xmlsoap.org/soap/encoding/\">\n <username xsi:type=\"xsd:string\">testuser</username>\n <password xsi:type=\"xsd:string\">testpass</password>\n </n1:Validate>\n </env:Body>\n</env:Envelope>", "action"=>"api", "controller"=>"auth"} User Load (0.001179) SELECT * FROM users WHERE (username = ''testuser'' AND passwd =''206c80413b9a96c1312cc346b7d2517b84463edd'') LIMIT 1 Web Service Request: Validate(username=>"testuser", password=>"testpass") Entrypoint: api <?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:Validate xmlns:n1="urn:ActionWebService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <username xsi:type="xsd:string">testuser</username> <password xsi:type="xsd:string">testpass</password> </n1:Validate> </env:Body> </env:Envelope> Web Service Response (0.576654): => false <?xml version="1.0" encoding="UTF-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:ValidateResponse xmlns:n1="urn:ActionWebService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="xsd:boolean">false</return> </n1:ValidateResponse> </env:Body> </env:Envelope> Sending data Completed in 0.58673 (1 reqs/sec) | Rendering: 0.00014 (0%) | DB: 0.00118(0%) | 200 OK [ http://localhost/auth/api] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060525/7b74d8ad/attachment-0001.html
Is it possible that the lighttpd server is handling the request serially and not getting to the soap request until the original request finishes (aka times out)? If so is there a better way to test the web service? On 5/24/06, Ben Wyrosdick <ben.wyrosdick@gmail.com> wrote:> > I am having an issue where I am trying to test a weservice that I wrote by > connecting to it from ruby. When I submit my form that calls the webservice > it times out. you can see from the lighttpd log that the webservice > completes just after the timeout. any ideas? am I doing something wrong? > > ---- source ---- > > def validate > auth = ActionWebService::Client::Soap.new(AuthApi, " > http://localhost:3000/auth/api") > > if params[:user] > if auth.validate(params[:user][:username], params[:user][:password]) > flash[:valid] = params[:user][:username] + '' Successfull'' > else > flash[:valid] = params[:user][:username] + '' Failed'' > end > end > end > > ---- loghttpd log ---- > > Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 22:23:46) > [GET] > Session ID: 2129cb461e45d4a67b014b4d265a9cda > Parameters: {"action"=>"validate", "controller"=>"users"} > Rendering within layouts/users > Rendering users/validate > Completed in 0.08427 (11 reqs/sec) | Rendering: 0.00422 (5%) | 200 OK [ > http://localhost/users/validate] > > > Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 22:24:02) > [POST] > Session ID: 2129cb461e45d4a67b014b4d265a9cda > Parameters: {"user"=>{"username"=>"testuser", "password"=>"testpass"}, > "commit"=>"Validate", "action"=>"validate", "controller"=>"users"} > > > Timeout::Error (execution expired): > /usr/local/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'' > /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' > /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'' > /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'' > /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'' > /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'' > /usr/local/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'' > /usr/local/lib/ruby/1.8/net/http.rb:1977:in `read_new'' > /usr/local/lib/ruby/1.8/net/http.rb:1046:in `request'' > /usr/local/lib/ruby/1.8/net/http.rb:840:in `post'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:93:in `post'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:116:in `start'' > /usr/local/lib/ruby/1.8/net/http.rb:545:in `start'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:115:in `start'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:92:in `post'' > /usr/local/lib/ruby/1.8/soap/streamHandler.rb:170:in `send_post'' > /usr/local/lib/ruby/1.8/soap/streamHandler.rb:109:in `send'' > /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:170:in `route'' > /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:141:in `call'' > /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call'' > /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:232:in `validate'' > /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/soap_client.rb:61:in > `perform_invocation'' > /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/base.rb:15:in > `method_missing'' > /app/controllers/users_controller.rb:60:in `validate'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/action_controller/base.rb:910:in > `perform_action_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in > `perform_action_without_benchmark'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/action_controller/benchmarking.rb:69:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in > `perform_action'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in > `process_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in > `process_without_session_management_support'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in > `process'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in > `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in > `process_request'' > /usr/local/lib/ruby/gems/1.8/gems/rails- 1.1.2/lib/fcgi_handler.rb:54:in > `process!'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > /usr/local/lib/ruby/gems/1.8/gems/rails- 1.1.2/lib/fcgi_handler.rb:53:in > `process!'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in > `process!'' > /Users/bwyrosdick/rails/authenticate/public/dispatch.fcgi:24 > > > Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/action_controller/templates/rescues/layout.rhtml > (500 Internal Error) > > > Processing AuthController#api (for 127.0.0.1 at 2006-05-24 22:25:02) > [POST] > Session ID: 6615e9cda1cbf643ac216968825c39b7 > Parameters: {"<?xml version"=>"\"1.0\" encoding=\"utf-8\" > ?>\n<env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\ > <http://www.w3.org/2001/XMLSchema%5C>"\n xmlns:env=\" > http://schemas.xmlsoap.org/soap/envelope/\<http://schemas.xmlsoap.org/soap/envelope/%5C>"\n > xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\ > <http://www.w3.org/2001/XMLSchema-instance%5C>">\n <env:Body>\n > <n1:Validate xmlns:n1=\"urn:ActionWebService\"\n env:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\ > <http://schemas.xmlsoap.org/soap/encoding/%5C>">\n <username > xsi:type=\"xsd:string\">testuser</username>\n <password > xsi:type=\"xsd:string\">testpass</password>\n </n1:Validate>\n > </env:Body>\n</env:Envelope>", "action"=>"api", "controller"=>"auth"} > User Load (0.001179) SELECT * FROM users WHERE (username = ''testuser'' > AND passwd =''206c80413b9a96c1312cc346b7d2517b84463edd'') LIMIT 1 > > Web Service Request: Validate(username=>"testuser", password=>"testpass") > Entrypoint: api > <?xml version="1.0" encoding="utf-8" ?> > <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:env=" http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "> > <env:Body> > <n1:Validate xmlns:n1="urn:ActionWebService" > env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "> > <username xsi:type="xsd:string">testuser</username> > <password xsi:type="xsd:string">testpass</password> > </n1:Validate> > </env:Body> > </env:Envelope> > > Web Service Response (0.576654): => false > <?xml version="1.0" encoding="UTF-8" ?> > <env:Envelope xmlns:xsd=" http://www.w3.org/2001/XMLSchema" > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> > <env:Body> > <n1:ValidateResponse xmlns:n1="urn:ActionWebService" > env:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"> > <return xsi:type="xsd:boolean">false</return> > </n1:ValidateResponse> > </env:Body> > </env:Envelope> > Sending data > Completed in 0.58673 (1 reqs/sec) | Rendering: 0.00014 (0%) | DB: 0.00118(0%) | 200 OK [ > http://localhost/auth/api] >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060525/ddb85615/attachment-0001.html
That is possible. How many fcgi listeners do you have set in your lighttpd.conf file? If its only set to one(the default) then add another by bumping the max-procs up to 2 and try again. That may be your problem/. -Ezra On May 25, 2006, at 6:56 AM, Ben Wyrosdick wrote:> Is it possible that the lighttpd server is handling the request > serially and not getting to the soap request until the original > request finishes (aka times out)? If so is there a better way to > test the web service? > > On 5/24/06, Ben Wyrosdick <ben.wyrosdick@gmail.com> wrote: > I am having an issue where I am trying to test a weservice that I > wrote by connecting to it from ruby. When I submit my form that > calls the webservice it times out. you can see from the lighttpd > log that the webservice completes just after the timeout. any > ideas? am I doing something wrong? > > ---- source ---- > > def validate > auth = ActionWebService::Client::Soap.new(AuthApi, " http:// > localhost:3000/auth/api") > > if params[:user] > if auth.validate(params[:user][:username], params[:user] > [:password]) > flash[:valid] = params[:user][:username] + '' Successfull'' > else > flash[:valid] = params[:user][:username] + '' Failed'' > end > end > end > > ---- loghttpd log ---- > > Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 > 22:23:46) [GET] > Session ID: 2129cb461e45d4a67b014b4d265a9cda > Parameters: {"action"=>"validate", "controller"=>"users"} > Rendering within layouts/users > Rendering users/validate > Completed in 0.08427 (11 reqs/sec) | Rendering: 0.00422 (5%) | 200 > OK [http://localhost/users/validate] > > > Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 > 22:24:02) [POST] > Session ID: 2129cb461e45d4a67b014b4d265a9cda > Parameters: {"user"=>{"username"=>"testuser", > "password"=>"testpass"}, "commit"=>"Validate", > "action"=>"validate", "controller"=>"users"} > > > Timeout::Error (execution expired): > /usr/local/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'' > /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' > /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'' > /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'' > /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'' > /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'' > /usr/local/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'' > /usr/local/lib/ruby/1.8/net/http.rb:1977:in `read_new'' > /usr/local/lib/ruby/1.8/net/http.rb:1046:in `request'' > /usr/local/lib/ruby/1.8/net/http.rb:840:in `post'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:93:in `post'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:116:in `start'' > /usr/local/lib/ruby/1.8/net/http.rb:545:in `start'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:115:in `start'' > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:92:in `post'' > /usr/local/lib/ruby/1.8/soap/streamHandler.rb:170:in `send_post'' > /usr/local/lib/ruby/1.8/soap/streamHandler.rb:109:in `send'' > /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:170:in `route'' > /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:141:in `call'' > /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call'' > /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:232:in `validate'' > /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/ > action_web_service/client/soap_client.rb:61:in `perform_invocation'' > /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/ > action_web_service/client/base.rb:15:in `method_missing'' > /app/controllers/users_controller.rb:60:in `validate'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/ > action_controller/base.rb:910:in `perform_action_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ > action_controller/filters.rb:368:in `perform_action_without_benchmark'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/ > action_controller/benchmarking.rb:69:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ > action_controller/benchmarking.rb:69:in > `perform_action_without_rescue'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ > action_controller/rescue.rb:82:in `perform_action'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ > action_controller/base.rb:381:in `process_without_filters'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ > action_controller/filters.rb:377:in > `process_without_session_management_support'' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/ > action_controller/session_management.rb:117:in `process'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb: > 38:in `dispatch'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/ > fcgi_handler.rb:150:in `process_request'' > /usr/local/lib/ruby/gems/1.8/gems/rails- 1.1.2/lib/ > fcgi_handler.rb:54:in `process!'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi'' > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > /usr/local/lib/ruby/gems/1.8/gems/rails- 1.1.2/lib/ > fcgi_handler.rb:53:in `process!'' > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/ > fcgi_handler.rb:23:in `process!'' > /Users/bwyrosdick/rails/authenticate/public/dispatch.fcgi:24 > > > Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/ > action_controller/templates/rescues/layout.rhtml (500 Internal Error) > > > Processing AuthController#api (for 127.0.0.1 at 2006-05-24 > 22:25:02) [POST] > Session ID: 6615e9cda1cbf643ac216968825c39b7 > Parameters: {"<?xml version"=>"\"1.0\" encoding=\"utf-8\" ?> > \n<env:Envelope xmlns:xsd=\" http://www.w3.org/2001/XMLSchema\ > "\n xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"\n > xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\ ">\n > <env:Body>\n <n1:Validate xmlns:n1=\"urn:ActionWebService > \"\n env:encodingStyle=\" http://schemas.xmlsoap.org/soap/ > encoding/\ ">\n <username xsi:type=\"xsd:string\">testuser</ > username>\n <password xsi:type=\"xsd:string\">testpass</ > password>\n </n1:Validate>\n </env:Body>\n</env:Envelope>", > "action"=>" api", "controller"=>"auth"} > User Load (0.001179) SELECT * FROM users WHERE (username = > ''testuser'' AND passwd =''206c80413b9a96c1312cc346b7d2517b84463edd'') > LIMIT 1 > > Web Service Request: Validate(username=>"testuser", > password=>"testpass") Entrypoint: api > <?xml version="1.0" encoding="utf-8" ?> > <env:Envelope xmlns:xsd=" http://www.w3.org/2001/XMLSchema" > xmlns:env=" http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "> > <env:Body> > <n1:Validate xmlns:n1="urn:ActionWebService" > env:encodingStyle=" http://schemas.xmlsoap.org/soap/ > encoding/ "> > <username xsi:type="xsd:string">testuser</username> > <password xsi:type="xsd:string">testpass</password> > </n1:Validate> > </env:Body> > </env:Envelope> > > Web Service Response (0.576654): => false > <?xml version="1.0" encoding="UTF-8" ?> > <env:Envelope xmlns:xsd=" http://www.w3.org/2001/XMLSchema" > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/ " > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> > <env:Body> > <n1:ValidateResponse xmlns:n1="urn:ActionWebService" > env:encodingStyle=" http://schemas.xmlsoap.org/soap/ > encoding/"> > <return xsi:type="xsd:boolean">false</return> > </n1:ValidateResponse> > </env:Body> > </env:Envelope> > Sending data > Completed in 0.58673 (1 reqs/sec) | Rendering: 0.00014 (0%) | DB: > 0.00118 (0%) | 200 OK [http://localhost/auth/ api] > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060525/578e89f0/attachment-0001.html
That worked ... thanks so much On 5/25/06, Ezra Zygmuntowicz <ezmobius@gmail.com> wrote:> > That is possible. How many fcgi listeners do you have set in your > lighttpd.conf file? If its only set to one(the default) then add another > by bumping the max-procs up to 2 and try again. That may be your problem/. > -Ezra > > On May 25, 2006, at 6:56 AM, Ben Wyrosdick wrote: > > Is it possible that the lighttpd server is handling the request serially > and not getting to the soap request until the original request finishes (aka > times out)? If so is there a better way to test the web service? > > On 5/24/06, Ben Wyrosdick <ben.wyrosdick@gmail.com> wrote: > > > > I am having an issue where I am trying to test a weservice that I wrote > > by connecting to it from ruby. When I submit my form that calls the > > webservice it times out. you can see from the lighttpd log that the > > webservice completes just after the timeout. any ideas? am I doing > > something wrong? > > > > ---- source ---- > > > > def validate > > auth = ActionWebService::Client::Soap.new(AuthApi, "http://localhost:3000/auth/ > > api") > > > > if params[:user] > > if auth.validate(params[:user][:username], > > params[:user][:password]) > > flash[:valid] = params[:user][:username] + '' Successfull'' > > else > > flash[:valid] = params[:user][:username] + '' Failed'' > > end > > end > > end > > > > ---- loghttpd log ---- > > > > Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 > > 22:23:46) [GET] > > Session ID: 2129cb461e45d4a67b014b4d265a9cda > > Parameters: {"action"=>"validate", "controller"=>"users"} > > Rendering within layouts/users > > Rendering users/validate > > Completed in 0.08427 (11 reqs/sec) | Rendering: 0.00422 (5%) | 200 OK [ > > http://localhost/users/validate] > > > > > > Processing UsersController#validate (for 127.0.0.1 at 2006-05-24 > > 22:24:02) [POST] > > Session ID: 2129cb461e45d4a67b014b4d265a9cda > > Parameters: {"user"=>{"username"=>"testuser", "password"=>"testpass"}, > > "commit"=>"Validate", "action"=>"validate", "controller"=>"users"} > > > > > > Timeout::Error (execution expired): > > /usr/local/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'' > > /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' > > /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout'' > > /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'' > > /usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'' > > /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'' > > /usr/local/lib/ruby/1.8/net/http.rb:1988:in `read_status_line'' > > /usr/local/lib/ruby/1.8/net/http.rb:1977:in `read_new'' > > /usr/local/lib/ruby/1.8/net/http.rb:1046:in `request'' > > /usr/local/lib/ruby/1.8/net/http.rb:840:in `post'' > > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:93:in `post'' > > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:116:in `start'' > > /usr/local/lib/ruby/1.8/net/http.rb:545:in `start'' > > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:115:in `start'' > > /usr/local/lib/ruby/1.8/soap/netHttpClient.rb:92:in `post'' > > /usr/local/lib/ruby/1.8/soap/streamHandler.rb:170:in `send_post'' > > /usr/local/lib/ruby/1.8/soap/streamHandler.rb:109:in `send'' > > /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:170:in `route'' > > /usr/local/lib/ruby/1.8/soap/rpc/proxy.rb:141:in `call'' > > /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:178:in `call'' > > /usr/local/lib/ruby/1.8/soap/rpc/driver.rb:232:in `validate'' > > /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/soap_client.rb:61:in > > `perform_invocation'' > > /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action_web_service/client/base.rb:15:in > > `method_missing'' > > /app/controllers/users_controller.rb:60:in `validate'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/action_controller/base.rb:910:in > > `perform_action_without_filters'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:368:in > > `perform_action_without_benchmark'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/action_controller/benchmarking.rb:69:in > > `perform_action_without_rescue'' > > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/benchmarking.rb:69:in > > `perform_action_without_rescue'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/rescue.rb:82:in > > `perform_action'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:381:in > > `process_without_filters'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/filters.rb:377:in > > `process_without_session_management_support'' > > /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session_management.rb:117:in > > `process'' > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:38:in > > `dispatch'' > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:150:in > > `process_request'' > > /usr/local/lib/ruby/gems/1.8/gems/rails- 1.1.2/lib/fcgi_handler.rb:54:in > > `process!'' > > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi'' > > /usr/local/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi'' > > /usr/local/lib/ruby/gems/1.8/gems/rails- 1.1.2/lib/fcgi_handler.rb:53:in > > `process!'' > > /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in > > `process!'' > > /Users/bwyrosdick/rails/authenticate/public/dispatch.fcgi:24 > > > > > > Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack- 1.12.1/lib/action_controller/templates/rescues/layout.rhtml > > (500 Internal Error) > > > > > > Processing AuthController#api (for 127.0.0.1 at 2006-05-24 22:25:02) > > [POST] > > Session ID: 6615e9cda1cbf643ac216968825c39b7 > > Parameters: {"<?xml version"=>"\"1.0\" encoding=\"utf-8\" > > ?>\n<env:Envelope xmlns:xsd=\" http://www.w3.org/2001/XMLSchema\ > > <http://www.w3.org/2001/XMLSchema%5C>"\n xmlns:env=\" > > http://schemas.xmlsoap.org/soap/envelope/\<http://schemas.xmlsoap.org/soap/envelope/%5C>"\n > > xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\ > > <http://www.w3.org/2001/XMLSchema-instance%5C>">\n <env:Body>\n > > <n1:Validate xmlns:n1=\"urn:ActionWebService\"\n > > env:encodingStyle=\" http://schemas.xmlsoap.org/soap/encoding/\ > > <http://schemas.xmlsoap.org/soap/encoding/%5C>">\n <username > > xsi:type=\"xsd:string\">testuser</username>\n <password > > xsi:type=\"xsd:string\">testpass</password>\n </n1:Validate>\n > > </env:Body>\n</env:Envelope>", "action"=>" api", "controller"=>"auth"} > > User Load (0.001179) SELECT * FROM users WHERE (username > > ''testuser'' AND passwd =''206c80413b9a96c1312cc346b7d2517b84463edd'') LIMIT 1 > > > > Web Service Request: Validate(username=>"testuser", > > password=>"testpass") Entrypoint: api > > <?xml version="1.0" encoding="utf-8" ?> > > <env:Envelope xmlns:xsd=" http://www.w3.org/2001/XMLSchema" > > xmlns:env=" http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "> > > <env:Body> > > <n1:Validate xmlns:n1="urn:ActionWebService" > > env:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ > > "> > > <username xsi:type="xsd:string">testuser</username> > > <password xsi:type="xsd:string">testpass</password> > > </n1:Validate> > > </env:Body> > > </env:Envelope> > > > > Web Service Response (0.576654): => false > > <?xml version="1.0" encoding="UTF-8" ?> > > <env:Envelope xmlns:xsd=" http://www.w3.org/2001/XMLSchema" > > xmlns:env="http://schemas.xmlsoap.org/soap/envelope/ " > > xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> > > <env:Body> > > <n1:ValidateResponse xmlns:n1="urn:ActionWebService" > > env:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ > > "> > > <return xsi:type="xsd:boolean">false</return> > > </n1:ValidateResponse> > > </env:Body> > > </env:Envelope> > > Sending data > > Completed in 0.58673 (1 reqs/sec) | Rendering: 0.00014 (0%) | DB: > > 0.00118 (0%) | 200 OK [http://localhost/auth/ api<http://localhost/auth/api> > > ] > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060525/79615c25/attachment-0001.html