I have a Midlet running perfectly for around 1-2 hours, connecting via HTTP and downloading a short text file every 100 seconds. After these 1-2 hours and around 60 downloads, I receive only IOExceptions (Status=-1) and no connection is possible. After exiting and restarting the Midlet everything works again for the next 1-2 hours.
Make sure that you are not calling Image.createImage() or any Image creation routine every 100 seconds (or whatever) as well. For some odd reason our HTTP problems reduced noticeably when we managed to get rid of that. Image creation routines apparently leak some underlying resource (file descriptors, memory, dunno?) and the problem might then show up in completely unrelated place which just happens to be using the same underlying resources.
(and yes, the gateway should be set to 0.0.0.0 as well).