Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Can't handle a lot of requests #8

Closed
leledumbo opened this issue Dec 31, 2012 · 5 comments
Closed

Can't handle a lot of requests #8

leledumbo opened this issue Dec 31, 2012 · 5 comments
Labels

Comments

@leledumbo
Copy link
Collaborator

I'm a bit biased whether this is fcl's fastcgi fault or brook, but I'll report here first to ensure (and you can forward to fpc mantis then). Basically I want to test the reliability of the application. So I create a simple fastcgi application that only outputs a single hello world message (just make an action with get method containing write('hello, world');). With httest, I then create 5000 (sometimes it passes, and fails at higher number like 8000) concurrent connection to request the server at once and here's what I got from debugger:

Exception class "HTTPError" at $080CDCA7 with message "Failed to write data to socket. Error: -1"
#0 fpc_raiseexception at :0
#1 CUSTFCGI$$TFCGIRESPONSE$$$WRITE_FCGIRECORD$PFCGI_HEADER at :0
#2 CUSTFCGI$
$TFCGIRESPONSE_$
$$DOSENDCONTENT at :0
#3 HTTPDEFS$
$TRESPONSE_$$$SENDCONTENT at :0
#4 .Ld17 at :0
#5 CUSTWEB$
$TWEBHANDLER_$
$$_DOHANDLEREQUEST$TREQUEST$TRESPONSE at :0
#6 ?? at :0
#7 TBROOKAPPLICATION__RUN() at /media/Sources/lazarus-fpc/git/brookframework/brokers/brookfclfcgibroker.pas:108
#8 main at test.lpr:9

@silvioprog
Copy link
Owner

It seems a memory leak in FCL-Web. But I'm not sure that. Can you test this sample below? It use pure FCL-Web, without Brook.

http://www.sendspace.com/file/0jmvip

@leledumbo
Copy link
Collaborator Author

Yes, it does return the same "Failed to write data to socket. Error: -1". For a reference, here's my httest script:

CLIENT 5000
_REQ localhost 8082
__GET / HTTP/1.1
__Host: localhost
__
_EXPECT . "HTTP/1.1 200 OK"
_EXPECT . "Hello, World!"
_WAIT
END

@silvioprog
Copy link
Owner

Hm... it's a problem in FCL-Web. Can you send the tests above to Free Pascal team?

@leledumbo
Copy link
Collaborator Author

@fajar-khairil
Copy link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants