Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionerror event id 1088 Pin
samerh28-May-07 18:49
samerh28-May-07 18:49 
AnswerRe: error event id 1088 Pin
VenkataRamana.Gali28-May-07 18:52
VenkataRamana.Gali28-May-07 18:52 
Questioncode for Uploading files into the database Pin
rameshbhojan28-May-07 17:23
rameshbhojan28-May-07 17:23 
AnswerRe: code for Uploading files into the database Pin
rameshbhojan28-May-07 18:25
rameshbhojan28-May-07 18:25 
QuestionWindows Authentication Pin
keroed_edmond28-May-07 16:46
keroed_edmond28-May-07 16:46 
AnswerRe: Windows Authentication Pin
VenkataRamana.Gali28-May-07 18:57
VenkataRamana.Gali28-May-07 18:57 
GeneralRe: Windows Authentication Pin
keroed_edmond29-May-07 3:49
keroed_edmond29-May-07 3:49 
QuestionGDI+ causes server to hang Pin
Ben[dog]28-May-07 14:32
Ben[dog]28-May-07 14:32 
Greeting fellow geeks & geekettes,

I'm running into a difficult problem that I'm finding very hard to troubleshoot, and I hope some people here have had the same issue and can help me resolve it.

I have a couple of websites on our server that use GDI+ to generate some graphics on the fly. The idea is to generate menu items with a specific font.
All it does is create a bitmap, read a background image file and copy over, then loads a local font file using a PrivateFontCollection and write the text onto it. The bitmap is then outputted straight onto the response stream. Pretty straight forward.

Now the problem is that server runs fine for a while, then after a while (few hours, a day at most), the server stops responding. Now the clue is that it only stops responding on those pages that use those generated labels, other pages seem ok.
An IIS restart solves the problem for another few hours, or so.

I would think it's because GDI+ resources are being wasted/leaked somehow.. yeah?

I've tried making the code as tidy as possible, closing/disposing of resources & streams but it's not helping (I actually think it lasts longer if I don't manually clean up but that's just a crazy thought). I've even tried caching the resulting bitmaps to avoid recreating all the GDI+ objects every time.

I have also the impression that it's the font loading/drawing part that's causing the problem, as similar code works fine on another project that doesn't actually write using fonts (just generate thumbnails).

Some pages can have up to 25 generated labels on them, which means 25 requests at a time on the server to generate these. Maybe too many simultaneous access to resources?

Finally, the server is a Windows 2000 Server with IIS 5. My development machine is a Windows 2003 and it doesn't seem to have that problem. However I suspect this is not a valid assertion that Windows 2003 works better as I'm the only user doing requests to the development machine and that is not reflecting the load put on the live server.

Anyway, basically, I'm a bit lost with this, and not being able to reproduce on the development machine doesn't help either.

Any suggestion or idea to test this would be greatly appreciated!

Cheers,
Ben


AnswerRe: GDI+ causes server to hang Pin
Christian Graus28-May-07 14:45
protectorChristian Graus28-May-07 14:45 
GeneralRe: GDI+ causes server to hang Pin
Ben[dog]28-May-07 15:19
Ben[dog]28-May-07 15:19 
AnswerRe: GDI+ causes server to hang Pin
Guffa28-May-07 15:35
Guffa28-May-07 15:35 
GeneralRe: GDI+ causes server to hang Pin
Ben[dog]28-May-07 15:47
Ben[dog]28-May-07 15:47 
AnswerRe: GDI+ causes server to hang Pin
Guffa28-May-07 19:21
Guffa28-May-07 19:21 
GeneralRe: GDI+ causes server to hang Pin
Christian Graus28-May-07 15:40
protectorChristian Graus28-May-07 15:40 
GeneralRe: GDI+ causes server to hang Pin
Ben[dog]28-May-07 15:55
Ben[dog]28-May-07 15:55 
GeneralRe: GDI+ causes server to hang Pin
Christian Graus28-May-07 16:31
protectorChristian Graus28-May-07 16:31 
GeneralRe: GDI+ causes server to hang Pin
Ben[dog]28-May-07 16:46
Ben[dog]28-May-07 16:46 
AnswerRe: GDI+ causes server to hang Pin
Guffa28-May-07 19:11
Guffa28-May-07 19:11 
GeneralRe: GDI+ causes server to hang Pin
Ben[dog]28-May-07 19:20
Ben[dog]28-May-07 19:20 
AnswerRe: GDI+ causes server to hang Pin
Ben[dog]28-May-07 18:32
Ben[dog]28-May-07 18:32 
QuestionWhy doesn't this work? Pin
Ranger4928-May-07 13:37
Ranger4928-May-07 13:37 
AnswerRe: Why doesn't this work? Pin
Not Active28-May-07 13:46
mentorNot Active28-May-07 13:46 
AnswerRe: Why doesn't this work? Pin
Christian Graus28-May-07 13:50
protectorChristian Graus28-May-07 13:50 
QuestionRe: Why doesn't this work? Pin
Ranger4928-May-07 16:18
Ranger4928-May-07 16:18 
AnswerRe: Why doesn't this work? Pin
Christian Graus28-May-07 16:33
protectorChristian Graus28-May-07 16:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.