[web-devel] juliusFile in yesod 0.8 eating all memory

Michael Snoyman michael at snoyman.com
Fri Apr 29 15:56:48 CEST 2011

Are you running juliusFile or juliusFileDebug? (The scaffolded site
uses the latter by default.)


On Fri, Apr 29, 2011 at 4:52 PM, JP Moresmau <jpmoresmau at gmail.com> wrote:
> Hi all,
> I've just upgraded to Yesod 0.8. I've changed all my Strings into
> Texts, and all my Data.JSON.Types into Data.Aeson.Types. I use these
> JSON objects in julius templates, by adding the orphan instance:
> instance (ToJSON a)=> ToJavascript a where
>       toJavascript =toJavascript . toJSON
> (Removing that instance causes compilation error, and I had it when I
> was using json-types).
> addJulius works fine when it contains Javascript code. However on one
> page I use juliusFile to load an external template. This eats all my
> memory and never returns under Warp when I launch the compiled exe (I
> see "thread killed" messages in the console, though), and in GHCi
> crashes with "out of memory".
> The code hasn't changed and was working fine in yesod 0.7 before the
> upgrade. If I remove juliusFile the page displays instantly.
> Any idea? I'm a bit stumped. I suppose I'm going to remove each of my
> variables in the julius file to narrow it down, but if anybody has any
> insight...
> Thanks!
> --
> JP Moresmau
> http://jpmoresmau.blogspot.com/
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

More information about the web-devel mailing list