Jump to content
  • Advertisement
Sign in to follow this  
Rattrap

Out of system resources

This topic is 4774 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is not about an app I'm working on, but a piece of software that our school system uses. I have talked with the devs of this app, and they seem to be a fairly clueless bunch. I thought I'd bounce the problem around here and see if any ideas popup. After a few days of being on, this server app starts to send "Not enough system resources" errors when workstations try to print. Now physical memory doesn't seem to be an issue. Our server has 2 gigs of ram, and win 2k server's taskmgr is reporting that 1.5 gigs of it is free. Shutting down the app and restarting it doesn't solve the problem. The whole server needs to be restarted to get rid of the error. It feels like a memory leak to me, but it looks like it is more likely some kind of Windows resource leak too. I know this is a little vague of a question.

Share this post


Link to post
Share on other sites
Advertisement
If the app is running on the 2K server box (which is how I understood the setup to be) then there's a nifty trick you can do to see if there is a Windows resource leak. Open Task Manager (Ctrl+Shift+Esc is a nice handy shortcut), switch to the Processes tab, View/Select Columns, and check the appropriate boxes. Handle count, USER objects, and GDI objects are probably the most pertinent to your investigation.

That will at least tell you what sort of leak is going on; the fact that it requires system restart indicates to me that it is a lower level problem (possibly printer drivers?) rather than a GDI or user handle problem; generally Win2k is pretty good about releasing a process's handles when it is killed. Naturally be sure to check other processes than just the app in question, in case it is a peripheral issue that manifests in that particular software.

Share this post


Link to post
Share on other sites
Well this problem started with an upgrade of the their software (to fix other issues). Nothing else on the system had changed. The only arguement against the print drivers is the print drivers should have nothing to do with it. The printing is being done on the workstations. The app (called Edulog) gets map data from various server apps. The one that has the problem is called ShapeServer. It transmits GIS map data to the workstations as the request it.

[edit]
And it does it with every workstation which have a variety of different print brands attached to them.

Share this post


Link to post
Share on other sites
Ah, that's much more clear. It's possible that the software is not closing or releasing sockets cleanly, which might also create a lower-level leak problem. Hard to say for sure though without seeing more of the system setup.

What's the exact nature and content of the errors? Are they event log messages, message boxes, some other form of logging? Is the error manifesting on individual workstations or just the server? Is there a client app that might be leaking locally which then locks some resource on the server and prevents it from releasing something cleanly?

Share this post


Link to post
Share on other sites
A wonderful message box is all that pops up on the server. The workstations hard lock until the ok button on the message box is pressed on the server. And with these people, it could be anything that's doing it.

Share this post


Link to post
Share on other sites
It sounds like they're creating a lot of GDI handles for bitmaps, pens or brushes, but aren't properly freeing them.

It's a common bug, unfortunately. If they aren't going to fix it, you may want to consider writing a script to reboot the server every night at midnight...assuming that's a safe time for the reboot.

Share this post


Link to post
Share on other sites
Yep, definitely sounds like a GDI leak then... although why a server app is allocating a dangerous amount of GDI objects is beyond me... but then again, any server-side app that blocks client I/O for a modal user interface is a pretty shoddy piece of work in the first place.

You can confirm if it's a GDI problem with the task manager setup I described above. Check the number of allocated handles about 5-10 minutes after you start the app, then check again when the app crashes.

Share this post


Link to post
Share on other sites
When we start threatening to pull money, they start fixing things. It took us over 2 months to get them to fix the last "upgrade" they did. But I don't feel like I should be debugging their software.

Share this post


Link to post
Share on other sites
I have so far watched the number of GDI objects go from a starting value of 14, to a value of 19. And it seems to keep going up everytime.

Thanks a lot.

Share this post


Link to post
Share on other sites
Hmm... 14 and 19 are not high numbers. For instance, on my system at this moment, the record is held by explorer.exe with 628. Does the resource count get extremely large just before the error occurs? (by extremely large, we're looking for something in the neighborhood of 1,000 or more GDI objects allocated, if not an order of magnitude higher).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!