Suchen

Suche

Aktuell

  • Aktuell
  • Kommentare
  • TagCloud
  • Bis jetzt sind noch keine Kommentare geschrieben worden
 .Net   Suche   ASP.Net   Asp.Net   Beta   Buchtipp   C#   CentOS   CoD   DateTime   DiceFight   Funktion   HTML   HowTo   HttpWebRequest   IIS7   JSON   Konfiguration   LCD   Lighttpd   Linux   Media   Microsoft   Mobile   Mono   MySQL   Oracle   Outlook   PHP   PostgreSQL   Programme   Quake3   RC   RealURL   SMTPE   SVN   Server   Snippet   TYPO3   Timeout   Treiber   Tutorial   USB   Vista   WebClient   Windows   bauer-martin.com   bm_chart   ffmpeg   x64 

Randnotiz

W3C

Valid XHTML Valid CSS

Tutorials, Server, .Net - 08.03.2009 07:55 - Alter: 1 yrs
- Keine Kommentare

Lighttpd mit Mono: Error 500 Problem

Tags: Lighttpd, Mono, ASP.Net

 

Hier habe ich berichtet, wie man Mono mit Lighttpd zum laufen bringt. Leider gab es immer noch ein kleines Problem: die Sockets wurden nicht richtig beendet, so dass nach einer gewissen zeit Lighttpd immer einen Fehler 500 gebracht hat. Nur ein Neustart des Webservers hat das Problem behoben. Auf Anfrage im offiziellen Mono-Forum wurde nun bestätigt, dass es in XSP einen kleinen Fehler gibt, welcher die Sockets nicht richtig schließt:

mbasil77: "Basically the Close method of this UnmanagedSocket class does a shutdown on the socket, but does not close it.  This leaves a file handle open.  I'm not sure if mono/fastcgi thinks that the webserver is responsible for actually closing the socket, but typically when you close a socket you do a shutdown, then a close."

Um das Problem zu lösen, hat mbasil77 auch einen Fix gepostet. Zum einem muss inder src/Mono/FastCgi/UnmanagedSocket.cs folgendes hinzugefügt werden:

 

[DllImport ("libc", SetLastError=true, EntryPoint="close")]
unsafe extern static int close (IntPtr s);

Sowie die Methode close folgendermaßen abgeändert:

public override void Close ()
{
       connected = false;
       if (shutdown (socket, (int) sock.SocketShutdown.Both) != 0)
               throw GetException ();
       close(socket);
}

Anschließend natürlich XSP neu kompilieren und installieren, sowie Lighttpd neustarten. Danach sollte das Problem eigentlich behoben sein.

 Lighttpd mit Mono - 31.12.2008 19:06


Blink del.icio.us Digg Furl Google Simpy Spurl Technorati Yahoo

Kommentare

  • Bis jetzt sind noch keine Kommentare geschrieben worden

Kommentar schreiben

Ins Gästebuch eintragen
CAPTCHA Bild zum Spamschutz