GD Library Error: Imagecreatetruecolor Does Not Exist

April 3rd, 2010 § 1 comment § permalink

Well the simplest way of solving this is to run

sudo apt-get install php5-gd

That will install the necessary libraries that you need to keep continuing. If you are in windows then you need to go  to your php.ini and uncomment the following lines

;extension=php_gd.dll
;extension=php_gd2.dll

[just remove the ; to uncomment them]

Hope that solves your image issues.

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 .