Twitter background generator version 0.1

September 18th, 2009 § 0 comments § permalink

Working on a very basic twitter background generator, right now focusing on how to get the sidebar width right. It is very much under use at my twitter handle @dipankarsarkar (http://twitter.com/dipankarsarkar). The core idea is to be abe to communicate more information about what i do as a person using the background image. Some features that I personally want are

  • Transparency for the sidebar – The image underneath should be visible, right now its a grey opaque color.
  • A right sidebar – After some research , I figured out that the safest and optimal width to cater for is 1200px, with the core content on the left sidebar though. More thoughts on that as I deploy some new changes.
  • Better fonts – Although new fonts / languages can be deployed. The code is not flexible enough right now to add new fonts.

That is a long enough list for the day :) , attaching the background with this as well. Let me know in case having cool backgrounds excite you.

Nginx + django fcgi lessons

January 19th, 2009 § 2 comments § permalink

Today was a good day as i learned some valuable lessons about django and nginx.

  1. ALWAYS close the database cursor in django, it can lead to some pretty wierd memory issues going forward.
  2. FIND the most optimal number of database connections you initialize for you connection pooling. This will let you optimize on memory going forward.
  3. ENSURE that you do not set a very high client_timeout, this means that if connections are not explicitly not closed by the client then the web server will not timeout. This results in bad memory behavior for the fcgi threads.

Well, this has solved my major issues with respect to kwippy. Also learned that GIFs are very fundamentally different than JPEGs which results in a lot of problem when used in the python imaging library. All in all a good day :D .