Typo on SCGI

Posted by andy

Switched Typo (this blog) to use SCGI on Apache. “SCGI is a replacement for the Common Gateway Interface (CGI) protocol. It is a standard for applications to interface with HTTP servers. It is similar to FastCGI but is designed to be easier to implement”. I was getting lots of random Error 500 on a new server installation and I think it has something to do with the FastCGI / Apache2 configuration option. I’ll be testing the stability of the Apache2 / SCGI setup the next coming days. More information on Rails on SCGI. Results of the stress testing will follow. For now at least I’ve ruled out Apache2 with FastCGI as serious combination for production Rails applications, that’s for sure.

Update: Lighttpd might be a better engine for SCGI.

Dual monitor on Dell Inspiron 8600c 2

Posted by andy

Vacation, at last! First on my TODO list is to get the second monitor output working on my Dell 8600c. When following the NVIDIA README instructions I get some really weird output. It seems the NVIDIA driver does not detect the presence of the second monitor (tried with both Iiyama 17” and a 32” JVC LCD HDTV). Instead, it maps both screen on the internal flatpanel display, which produces a really funny effect of having both screen framebuffers mapped to 0,0 of the DFP screen!

The magic configuration parameter is ConnectedMonitor. The NVIDIA driver detected “DFP-0, CRT-0” by default when dual screen is configured. The trick is to specify a ConnectedMonitor option in both Screen sections, each specifying either “DFP-0” or “CRT-0”. The relevant parts of the xorg.confg are shown below:

Section "Screen" 
    Identifier     "Screen1" 
    Device         "NVIDIA Corporation NV34M [GeForce FX Go 5200]-1" 
    Monitor        "Monitor1" 
    ...
    Option         "ConnectedMonitor" "DFP-0" 
    ...
EndSection

Section "Screen" 
    Identifier     "Screen0" 
    Device         "NVIDIA Corporation NV34M [GeForce FX Go 5200]-0" 
    Monitor        "Monitor0" 
    ...
    Option         "ConnectedMonitor" "CRT-0" 
    ...
EndSection

Also note the separate monitor definition references. I had to force the CRT-0 specs to VertRefresh 60HZ as my JVC LCD HDTV only accepts VGA signals which have a vertical refresh of 60HZ, anything above or below will produce a nice blue screen.

Download the full xorg.conf with dual screen setup

ActiveRecord InvalidStatement 0

Posted by andy

It seems that ActiveRecord cannot return sane errors when some constraint on a database operation is not met, for instance if you forget to set an attribute which has a “NOT NULL” constraint. If this happens AR simply throws an InvalidStatement exception. You would have to actually search your database logs for the error message. This really sucks! Also check out this blog post on the same topic. Oh well, perhaps I should try and fix this issue instead of griping, it’s open source after all. You can of course also argue that the model file in the Rails app was not complete (:allow_nil => false)..

New toy

Posted by andy

More on this soonish. Whacky cool picture effect courtesy kleinejan.org :)