[Mono-list] mod-mono apache asp.net request cancelled by other request

Peter Hagen peter at wingsofdeath.net
Fri Jun 10 05:50:47 EDT 2011


Hi

I solved my issue, by keeping the bufferOutput on true, but calling the
Response.Flush(). I seemed, by accident, to call the
Response.OutputStream.Flush() which doesn't have the same effect. Now
the file is downloaded without buffering it completely in memory, and
without the socket being closed (although this is still something that
should not have happened, I guess).

Cheers

Peter

On Thu, 2011-06-09 at 21:02 +0200, Peter Hagen wrote:

> Hi,
> 
> today I found an issue with my mono 2.10.2 + apache setup, which I
> cant figure out what is wrong with it. Hopefully someone has some
> similar experience. I run a site, which has a aspx page, but also uses
> iHttpHandler's. There is a handler that queries the database and with
> small buffers sends it to the client. For this the
> Response.BufferOutput is set to false, and that works perfectly. It
> starts downloading directly. Today I was testing a big fill on our
> development site, which runs on the same machine as the live site, and
> suddenly noticed, on the apache server, that while during the
> download, and I called another request, even from another host, my
> download is cancelled. I tested it after that with XSP on the same
> machine (and later on another server) and there it works without a
> problem. So it seems to be a combination with mod-mono or apache
> maybe. In all cases, I see first a message like this in the error.log
> (the number changes):
> 
> [Thu Jun 09 20:44:48 2011] [error] Unknown command: 2004184946
> 
> And after that the exception is posted to the error log:
> 
> [vspdev|09-06-2011 20:45:18|11] Exception in
> _ExecuteActionXML::element=unknown1
> [vspdev|09-06-2011 20:45:18|11] System.Net.Sockets.SocketException
> [vspdev|09-06-2011 20:45:18|11] The socket has been shut down
> [vspdev|09-06-2011 20:45:18|11]   at System.Net.Sockets.Socket.Send
> (System.Byte[] buf, Int32 size, SocketFlags flags) [0x00000] in
> <filename unknown>:0 
>   at Mono.WebServer.ModMonoRequest.Send () [0x00000] in <filename
> unknown>:0 
>   at Mono.WebServer.ModMonoRequest.SendResponseFromMemory
> (System.Byte[] data, Int32 position, Int32 length) [0x00000] in
> <filename unknown>:0 
>   at Mono.WebServer.ModMonoWorker.Write (System.Byte[] buffer, Int32
> position, Int32 size) [0x00000] in <filename unknown>:0 
>   at Mono.WebServer.ModMonoWorkerRequest.SendResponseFromMemory
> (System.Byte[] data, Int32 length) [0x00000] in <filename unknown>:0 
>   at System.Web.HttpResponseStream.Write (System.Byte[] buffer, Int32
> offset, Int32 count) [0x00000] in <filename unknown>:0 
>   at System.Web.HttpWriter.WriteString (System.String s, Int32 index,
> Int32 count) [0x00000] in <filename unknown>:0 
>   at System.Web.HttpWriter.Write (System.String s) [0x00000] in
> <filename unknown>:0 
>   at Willow.Data.Converter.CsvStorage.Save () [0x00000] in <filename
> unknown>:0 
>   at Willow.Data.Converter.CsvStorage.Dispose () [0x00000] in
> <filename unknown>:0 
>   at Willow.Cms.Common.CollectionPlugin.CollectionToFile
> (System.Web.HttpResponse response, iCmsFormControlValues values,
> Willow.Cms.Common.ActionResult result, iWillowDataCollection
> collection, System.String TempFile, System.String OutputFilename,
> System.String Filetype, Willow.Common.WillowXmlElement
> FileSettingsXml) [0x00000] in <filename unknown>:0 
>   at Willow.Cms.Common.WillowFormControl.DownloadCollection
> (Willow.Cms.Common.ActionResult result, System.String Filename,
> System.String Filetype, iWillowDataCollection collection,
> Willow.Common.WillowXmlElement FileSettingsXml) [0x00000] in <filename
> unknown>:0 
>   at Willow.Cms.Common.WillowFormControl.DownloadFile
> (Willow.Cms.Common.ActionResult result, Willow.Common.WillowXmlElement
> xml) [0x00000] in <filename unknown>:0 
>   ...
> 
> Somehow, the socket is just being closed. As far as I know, this is
> happening since today, but I also tried older revisions of the code,
> and they have the same effect. While searching for an answer, I also
> restarted the server and after that the live site does the same thing.
> i cant be 100% sure that the live site (with a bit older code) was
> working 100% ok before. So, anyone any idea? Been searching, testing
> and trying all day, and have no clue were to look for this. 
> 
> Cheers
> 
> Peter
> 
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20110610/d5ed515e/attachment.html 


More information about the Mono-list mailing list