07-Apr-2008 Uncategorized

back from perl harbor

I use a control panel called PLESK to manage the dedicated server that MARKSHIELDS.COM is hosted on along with a slew of other sites that I host for my friends. The software is auto-upgrading and, until recently, never gave me any trouble. The 8.3.0 upgrade, however, was really a huge pain in the arse as far as my ability to blog with MovableType which was negatively affected. I know this may be a bit boring, but check out all the s*** this guy at PLESK had to do to bring me back:

Mark,

The problem was caused by Perl impoperly upgraded with packages. I had to reinstall Perl, rebuild mod_perl and modules DBI and DBD::mysql to fix the problem.

Here is the steps I had to pass:

1) there were two Perl packages installed in the system:

[root@4169 ~]# pkg_info | grep perl-5.8
perl-5.8.8 Practical Extraction and Report Language
perl-5.8.8_1 Practical Extraction and Report Language

I have removed them both forcedly:

[root@4169 ~]# pkg_delete -f perl-5.8.8
[root@4169 ~]# pkg_delete -f perl-5.8.8_1

2) I have got perl-5.8.8_1 precompiled package from ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/All and installed it:

[root@4169 ~]# pkg_add perl-5.8.8_1.tbz

3) then, I have rebuild mod_perl2 port (with FORCE_PKG_REGISTER environment variable set, to reinstall already installed package):

[root@4169 ~]# cd /usr/ports/www/mod_perl2
[root@4169 /usr/ports/www/mod_perl2]# export FORCE_PKG_REGISTER=1
[root@4169 /usr/ports/www/mod_perl2]# make clean ; make install

4) After that there were no more Segmentation fault errors. However, CGI scripts were not working still with these messages in suexec log (/var/log/httpd-suexec.log):

[2008-04-07 00:42:20]: uid: (10050/bethdeth) gid: (2525/2525) cmd: mt.cgi
[2008-04-07 00:42:20]: command not in docroot (/usr/local/www/vhosts/queenbeth.com/cgi-bin/mt/mt.cgi)

This was caused by Plesk suexec overwritten by Apache’s one. I have restored Plesk’s suexec:

[root@4169 /usr/local/www/vhosts/queenbeth.com/cgi-bin]# cp -fp /usr/local/psa/bin/psa-suexec /usr/local/sbin/suexec
[root@4169 /usr/local/www/vhosts/queenbeth.com/cgi-bin]# chmod 4755 /usr/local/sbin/suexec

5) and generic scripts started working. However, http://queenbeth.com/cgi-bin/mt/mt.cgi still does not work:

[Mon Apr 07 00:47:45 2008] [error] [client 82.200.65.190] Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm line 1212.
[Mon Apr 07 00:47:45 2008] [error] [client 82.200.65.190] Had to create ::imp_data_size unexpectedly at /usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm line 1212.
[Mon Apr 07 00:47:45 2008] [error] [client 82.200.65.190] Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm line 1212.
[Mon Apr 07 00:47:45 2008] [error] [client 82.200.65.190] Premature end of script headers: mt.cgi
[Mon Apr 07 00:48:01 2008] [error] [client 82.200.65.190] Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm line 1212.
[Mon Apr 07 00:48:01 2008] [error] [client 82.200.65.190] Had to create ::imp_data_size unexpectedly at /usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm line 1212.
[Mon Apr 07 00:48:01 2008] [error] [client 82.200.65.190] Use of uninitialized value in subroutine entry at /usr/local/lib/perl5/site_perl/5.8.8/mach/DBI.pm line 1212.
[Mon Apr 07 00:48:01 2008] [error] [client 82.200.65.190] Premature end of script headers: mt.cgi

To resolve this problem I had to rebuild ports databases/p5-DBI and databases/p5-DBD-mysql50. Now, I see that scripts are working fine.

Please check and let us know if you have any further questions.

Wow. That solution cost me $75 (the cost of PLESK’s single incident rate). That’s well worth it since I’d spent at least 12 hours of my own time trying to figure it out on my own. Yay.

I also had another issue with my server performance coming to a screeching halt. That solution I did figure out on my own. The cause? China. Yes — China the country. Over 30 sites were hot-linking images of my Batmobile among other things. This activity was pushing my server over the 900 connection barrier. Normally my machine can handle something like that, but an HTTP connection to China is open a LOT longer than normal. Too may open requests and performance took a tumble. So, anyway, sorry China, but find your own Super Genius. Either that or copy my images and host them yourselves for crying out loud.

And now… presenting Avril Lavigne. Photography courtesy of Mark and Sam. If this isn’t enough, look what we saw here and here and here and here because we saw this. Ashlee: Sorry about the time when I posted that SNL video of you.

Avril Lavigne performing at the Target Center in Minneapolis, MN

Avril Lavigne performing at the Target Center in Minneapolis, MN