Freezes up after running for 20minutes

I'm using the following code to control 2 leds from a custom page that i've written. When I let it sit on that page (it refreshed through AJAX every 2 seconds, but only to get the status of the two pins) for about 20 minutes the arduino stops responding and I have to reset it. If I have the serial monitor open I can see it just stop sending/receiving. Any ideas?

#include <WString.h>
#include <Ethernet.h>
#include <stdlib.h>
byte mac[] = { 0x00, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 1, 30 }; // MY IP change to your needs
Server server(80);
String readString = String(100);


void setup(){
  
  Serial.begin(9600);
  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(3, OUTPUT);
  Ethernet.begin(mac, ip);
  digitalWrite(7, HIGH);
}

void loop(){
  Client client = server.available();
  if (client) 
  {
    while (client.connected()) 
    {
      if (client.available()) 
        {
        char c = client.read();
        if (readString.length() < 100)
            {
            readString.append(c);
          }
        if (c == '\n') 
            {
              //code for pin 8
            if(readString.contains("toggle8"))
                {
              toggle(8);
                  //client.println("<html><head>");
                  //client.println("<meta http-equiv=REFRESH content=0;url='http://192.168.1.31/frontend.php'>");
                  //client.println("</head></html>");
                }
              if(readString.contains("get8")){
          // Now output HTML data starting with standart header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          //client.println("led 8 is"); 
            //client.println(digitalRead(8));
            if(digitalRead(8) == 0){
              client.print("<IMG SRC=images/lightoff.png>");}
              else if(digitalRead(8) == 1){
              client.print("<IMG SRC=images/lighton.png>");}
            Serial.println("pin 8 is");
            Serial.println(digitalRead(8));
              }
        
            //code for pin 3
            if(readString.contains("toggle3"))
                {
              toggle(3);
                  //client.println("<html><head>");
                  //client.println("<meta http-equiv=REFRESH content=0;url='http://192.168.1.31/frontend.php'>");
                  //client.println("</head></html>");
                }
            if(readString.contains("get3")){
          // Now output HTML data starting with standart header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println();
          //client.println("led 8 is"); 
            //client.println(digitalRead(3));
            if(digitalRead(3) == 0){
              client.print("<IMG SRC=images/lightoff.png>");}
              else if(digitalRead(3) == 1){
              client.print("<IMG SRC=images/lighton.png>");}
            Serial.println("pin 3 is");
            Serial.println(digitalRead(3));
              }
            
            
            
            
            readString="";
          client.stop();
            
              }
            }
        }
      }
    
  
}
 
 int toggle(int pinnumber){
  if(digitalRead(pinnumber) == HIGH){
    Serial.print("toggle functions says ");
    Serial.print(pinnumber);
    Serial.print(" is on");
    Serial.println();
    // if light is on turn it off
    digitalWrite(pinnumber, LOW);
    return(0);
  } 
  if(digitalRead(pinnumber) == LOW){
    Serial.print("toggle functions says ");
    Serial.print(pinnumber);
    Serial.print(" is off");
    Serial.println();
    // if light is off turn it on
    digitalWrite(pinnumber, HIGH);
    return(0);
  }
}

I'm willing to bet on that WString library.

Crap, was afraid someone was gonna say that. Guess I need to learn to use STRCMP eh

Yep, you're right

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1241618944

So, i patched the library and it still froze up. I think its because I had the serial window open and it got too much stuff in it. Is that possible? I run it with the serial window closed and it doesn't lock up.

It is not possible for it to lock up because the serial monitor had too much stuff in it. The serial monitor does not provide any status back to the Arduino.

It is possible that the amount of data that you are sending to the serial port is causing a problem, though not very likely. There is no transmit buffer. One would need to study the HardwareSerial.cpp file to see if there is anything that might proved a clue.