Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michiel van Nieuwkerk 6 posts 39 karma points
    Nov 10, 2011 @ 15:43
    Michiel van Nieuwkerk
    1

    Bug causing '... max pool size was reached ...' message

    In one of the sites I've build I am using UComment. Great functionality, but I discovered a serious issue retrieving comments in XSLT.

    The error I got was:

    Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached.

    This error has something to do with databaseconnections/datareaders not being closed and the result is lots of open connections to your Umbraco database. This was also the case in my database.

    Luckily SQL Server shows the query that opened the connection and so I found out that the query "select * from comment where nodeid = @nodeid and spam != 1" used in XSLTLibrary.cs function GetCommentsForNode was the cause.

    If you check out the code (http://ucomment.codeplex.com/SourceControl/changeset/view/62759#585956), glad I could, you will see that in the function GetCommentsForNode (line 71) a datareader is opened. Next the comments will be transformed into an XML using CommentsToXml (line 83) which is then returned to your XSLT. The problem is dat the datareader is not closed in CommentsToXml or GetCommentsForNode.

    I've solved it by just duplicating the function GetCommentsForNode into my own project since I already had some custom UComment stuff in it.

    I hope it will be solved soon in the source too.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies