Strange, my last posting has vanished...
Anyway, here it is again:
When my CGI is sending a large pdf (371kB), Apache locks up the CGI process into zombie status, and sends nothing. I have tried to send a small pdf (22kB), and everythings works just fine. See my code below.
BTW, the zombie CGI cannot be removed by the task manager, I actually have to reboot the server.
Has anybody an idea what is going on here? Hard to believe that Apache imposes a size limit on application data.
Thanks,
Albert
Anyway, here it is again:
When my CGI is sending a large pdf (371kB), Apache locks up the CGI process into zombie status, and sends nothing. I have tried to send a small pdf (22kB), and everythings works just fine. See my code below.
BTW, the zombie CGI cannot be removed by the task manager, I actually have to reboot the server.
Code:
#compile exe #dim all #include "win32api.inc" function pbmain() as long local sError as string local hPageFile as long local sData as string local sHeader as string hPageFile = freefile open "A_22kB_File.pdf" for binary lock shared as #hPageFile REM open "A_371_kB_File.pdf" for binary lock shared as #hPageFile if err then sError="Cannot open file: "+format$(err)+" "+error$(err) goto errorhandler end if get$ hPageFile,lof(#hPageFile),sData close #hPageFile sHeader = "Content-Type: application/pdf"+$crlf+ _ "Content-Length: "+format$(len(sData))+$crlf+$crlf stdout sHeader+sData exit function errorhandler: stdout "Content-type: text/html"+$crlf stdout "" stdout "<html>" stdout "<head>" stdout "</head> stdout "<body>" stdout "<p>Error: "+sError+"</p>" stdout "</body>" stdout "</html>" stdout "" end function
Thanks,
Albert
Comment