Ethernet Lbrary hangs workoaround?

Hi, I am playing with an Ethernet Shield and Arduino R3. I have done a small WebServer but it hangs after exactly 30/35 seconds. Is it a known problem by the way: http://forum.arduino.cc/index.php?topic=28084.0

But what is the best solution? Upgrade to Ethernet2? It seems a bit old Ethernet2 by the way....

Suggestions? thank you!

I have tested web server code for days at a time without fail. And I mean tested, not just run in "Perfect World" conditions. http://playground.arduino.cc/Code/WebServerST Try the second of the two examples. It will work better on an Uno.

The first example does have a function named checkServerStatus. You might want to incorporate that into your sketch to prevent lockups. It is not in the second example, but should be easy to implement.

Hi

My feature rich Arduino web server at http://www.2wg.co.nz has been running for 18 days without error and runs with about 1K of free RAM.

Can you determine if the Arduino has stopped or just the Ethernet that has stopped?

If it is the former you may have to find a memory leak - start by checking free heap memory - if it grows until your system crashes you have confirmation of a memory leak.

If it is just Ethernet stopping you need to extract and observe your socket statuses.

The source code for my application is available to download on its website. You will find code to both extract memory usage and check Ethernet socket statuses in there.

Cheers

Catweazle NZ