Added decrement of limit when a resource could not be acquired.
Added decrement of limit when a resource could not be acquired.

Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick