May 10th, 2007 by rick

Memory Issues

2 comments on 194 words

We’re having some memory issues with the Lighthouse app. I just pushed out a small update, and the application servers didn’t restart properly. I had to bring the site down to check some stuff out for a few minutes. It’s up and running now, but with fewer app servers while I figure out what’s going on.

Update: Got it! We had a quick interruption of service while I reset the config, but things are back to normal now.

I use Bruce’s excellent keyword_search gem to handle the Lighthouse ticket queries. It relies on Dhaka which is a set of tools for generating lexers and parsers. Together, they give me a very nice way of building flexible queries (more on that later!), but I noticed that Dhaka started going on a memory binge in the latest versions. I just removed the regex lexer files (lexer/regex_grammar, lexer/regex_tokenizer, and lexer/regex_parser) and all was good. Whew!

If you want to use the keyword_search gem, go with 1.1.1 for now…

Discussion

  1. Will Will said on May 11th

    nice quick fix, whew indeed…i dont even have a clue how you figured out what was wrong though.

    but thanks for the tips…

  2. rick rick said on May 11th

    At first I thought it was a memory leak, so I broke out the bleak house plugin. I noticed it wasn’t leaking, but going on a memory binge. script/console ate up 200MB+ on my mac.

    This is where I got lucky. I tried loading the various gems manually to see where the memory usage jumps. My first try is the dhaka lib, which shot to 45MB just from irb. Yikes.

Sorry, comments are closed for this article.