The most common cause is "timed / boss monster spawn" and a certain memory leak.
Commonly Kelvesu and Valento are often distributed with corrupt configuration files. I don't know why, just
bad repacks I guess. Delete these monsters from your server and see if that fixes the problem. If it does, you should probably hunt for a repack with a working config file for these monsters, rather than trying to fix the broken ones.
If the crash is only once or twice a day, or every other day, with no specific interval or time of day, then the chances are that you are hitting a bug which seems to be present in most of the PT servers based on jPT 4096. It almost never happens on the original, but that isn't usually as popular. The PT server fragments memory quite badly as part of it's (poor) design, but as we've added monsters, maps, items, translations etc. this progressively reduces the resources available for it to make a mess of. XD I know some teams have managed to reduce this, but I don't know any who have solved it. Certainly, nobody has ever
shared a solution with us.
[highlight]Many people
think that having[/highlight] 6 - 8 Gig or [highlight]more RAM should solve this. They are wrong![/highlight] Remember that the PT Server is a 32-bit program, and that a 32-bit program can only address 4Gig. Windows will only get about 3 of that 4Gig for it's own use, and with the OS running you'll be lucky to get more than a couple for your server. Paging to the swap file will give it the impression that it has 3 Gig if you modify the PE to use more than 2Gig, but paging is slow!
If your server has more than 3Gig of memory, you are already working around the x64 problems, and PT is actually running in a Virtual x86 system, with overheads of it's own. This
may even make the situation worse. (My experience suggests how much better or worse the situation becomes depends on the OS, Service Pack and most importantly the motherboard chipset and BIOS code... which in this day and age should really have very little to do with running applications, but...)
Most pServers with any population simply run the server under some form of re-starter, so that when the server crashes, it starts up again straight away. Cleaver ones try to set the server to shut down once or twice a day as part of a "regular maintenance regime". That way players get warning of the impending restart, and don't loose any kit or Exp. The server gets to clean it's fragmented memory blocks up and start again fresh once a day or so.
Several server repacks include
You must be registered to see links
which seems to be a fairly effective restarter and most still have the Server2048 which was the official restarter, but it's not very adaptable. Windows Vista, 2008 and 7 have restart options in the Task Scheduler.
To prove how simple it is to achieve a custom solution Tough shared an
You must be registered to see links
which he created for this purpose, and I shared a similar
You must be registered to see links
which I've used and can be expanded upon. Unlike the others, it will spot when the server has "hung" rather than completely crashed... but I've seen pServers solve this with PHP scripts too. So don't think these are the only solutions.