PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu May 23, 2024 11:36 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Nov 09, 2010 5:13 pm 
Offline
Supporter

Joined: Fri May 15, 2009 3:28 pm
Posts: 96
Hi,

I made a previous post about this topic, but have since done some more investigation into it and would like this answering:

When running PdfSharp/MigraDoc through a web application to generate a pdf, after the webpage is closed, should the memory allocated to the the application pool's application the code is running under be released? becuase it isnt....

If i am mistaken, fine - but I have a major issue with this occurring for me. I have tried running pure MigraDoc/PdfSharp 1.2 and 1.3 (i.e. without any of my code apart from a function to add a page with some text on and a function to output the PDF to the browser) to ensure its nothing of "mine" causing this.

When I use task manager to see how much memory the w3wp.exe (i.e. the app pool in iis) is using. it goes up from around 10mb initially (i.e. when the app pool is freshly recycled), to around 50mb after the pdf is outputted to the browser. I then save the pdf and the browser window closes. The memory usage doesnt then go down.

If i then create another pdf (which is exactly the same) the memory usage goes up again, so its now around 51mb, and it keeps doing this, which eventually causes the server to crash.

if PdfSharp is caching fonts, then surely it would be re-using the cached fonts and the memory usage would go up, but then drop back to what it was originally before the 2nd pdf was generated? rather than continuing to raise indefinately as more and more pdf's are created.

I have tried adding the workaround mentioned here:
http://forum.pdfsharp.net/viewtopic.php?f=2&t=859
to clear out the hashtable the fonts are cached in, but it seemed to have no effect and certainly didnt solve this issue i am encountering.

I am currently recycling the application pool every 20 requests, which I hope will work as a temporary fix, but I need to implement something more robust.

I genuinely thing PdfSharp is amazing, especially as its free and I am willing to to anything required to help solve this issue (if it is an issue and not something i am just missing) and appreciate all the time and effort put into it, so please dont think I am just slating this product, becuase im not. I just have a big problem and dont know what the solution is.

also, this issue has been raised before, but no one adressed it fully:
http://forum.pdfsharp.net/viewtopic.php?f=2&t=1358&p=3719&hilit=memory#p3719

Thanks,

Mike


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group