[Dancer-users] Dancer occasionally eats lots of memory

Konstantin A. Pustovalov lamoz at adriver.ru
Tue Oct 16 10:26:14 CEST 2012

Hello guys!

I have found that dancer's memory consumption is indeterminant.
I am writing RESTful statistics service. Have discovered that dancer can 
consume lots more memory with one request than another with essentially 
same POST body size.
Some tests: http://pastebin.com/yuy1ZKfn
The output: http://pastebin.com/YDHqLzQh

You can see that when I send ~12MB json string (~20MB hash in memory) 
dancer can consume ~ 24MB when data is sent as nested hash or ~81MB 
(4x!) when sent as-is.
Tranfering dozens of MBs of statistics is normal in my service, so it 
can hit swap easily by clients mistake. What can I do to make dancer 
behave predictably in memory consumption? May be I am doing something wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20121016/48bbbcc4/attachment.htm>

More information about the Dancer-users mailing list