Hello, reader!

My name is Eugene Lazutkin.

I'm a software developer based in the Dallas-Fort Worth metroplex. Lazutkin.com is my professional blog, which contains short writeups and presentations regarding modern web applications. All articles here are written by myself, unless stated otherwise.

Recent posts

Say no more! Say no more!

8 Sep, 2005 - 1 minutes
Being a little bit frustrated by the lack of caching options for my web site I’ve added locmem: cache to Django. It is fully multithreaded local memory-based cache, which uses reader-writer lock to do its magic. It seems to work well but I need some time to test it more. I think file: is going to be next.

Django on Dreamhost: happy end

7 Sep, 2005 - 1 minutes
It looks like all kinks with Django on Dreamhost were worked out. Of course, I am referring to MySQL problem (see my previous post) and strange stalling of long pages, which I reported to Django’s mailing list. It turned out that other people had these problem too. Jason McBrayer shared his experience. He pointed out to possible flup/fcgi.py problem. I contacted Allan Saddi — the author of flup and other Python libraries and utilities.

Django with MySQL: problem solved?

5 Sep, 2005 - 1 minutes
It looks like the problem is solved. Django creates one (1) connection to database and reuses it to handle requests. Multithreaded FastCGI creates threads to handle requests. These threads make requests to MySQL, which gets confused and loses its cool^H^Honnection. This process is random and compounded with multiple web requests at the same time. For example, if Google Web Accelerator decided to prefetch some pages, your web site would be hosed.

Opera and Dojo

5 Sep, 2005 - 1 minutes
I decided to try how well Opera works with my site. It mostly works. You can go and see stuff but all Dojo-related code doesn’t work. Interesting that Google Maps works properly. When I switched to admin mode to edit this article, it turned out that TinyMCE doesn’t work either. But good news is Dojo and TinyMCE failed gracefully.

More on MySQL and Django problems

5 Sep, 2005 - 1 minutes
I complained about instability of this site in my previous post. Now, after intensive googling, it looks like it may be related to multiple threads or forked processes using the same connection to MySQL. Apparently it can confuse MySQL. Children should create their own connections after spawning. If Django does reuse connections, it may be possible to fix it. Otherwise, CGI is the way to go. The latter solution would be slow.

Django and MySQLdb worries

4 Sep, 2005 - 2 minutes
I am totally at loss. I am getting weird errors like this: OperationalError: (2013, 'Lost connection to MySQL server during query') They are pretty much random but fairly frequent. Apparently it may be caused by different MySQL timeouts, which I cannot control. It seems that in order to combat those you have to call connection.ping() periodically to reconnect. I added them to Django’s MySQL handler and … now I am getting these errors during execution of connection.

Dojo: 1st impression

3 Sep, 2005 - 2 minutes
The best thing about Dojo 0.1: it’s quite easy to create portable widgets. Such widgets work similar to Microsoft IE’s behaviors but they are even more self-contained. Dojo widgets can work with fragments of HTML and CSS, which will be inserted during the object creation. The event system is very elaborate. Of course Dojo is more than a simple widget factory. For example I didn’t try the I/O facility yet.

New Design 0.1 is here!

New design is here. Well, some elements of it. I had bigger ideas, but CSS didn’t work reliably, and JavaScript option was in debugging mode. So I decided to update this site now and add other planned stuff later. One reason I postponed JavaScript thingy is I want to try Dojo. It looks like a good foundation for widgets. I am going to create a couple of them at least. If it works okay, I’ll be using it in other projects as well.

New Design 0.1

29 Aug, 2005 - 1 minutes
New design is coming along nicely. Thank heaven for Photoshop, POV-Ray, and digital cameras! I need to work out a few quirks and I’ll be ready to create Django templates. Additionally I’ll create some custom tags to handle non-traditional formats.

Upcoming Additions

26 Aug, 2005 - 1 minutes
As you can see blog is already operational. I am planning to add to it Comments, Trackbacks, and RSS/Atom support. Main page will be redesigned so it would include snippets from other applications and external sources. I am planning to change look and feel of this web site. Obviously what I have now is temporary. Upcoming applications: Lunch Box 3.0, picture gallery, personal news integrator.