Tagged: error

apachectl stopped working after Mac OSX 10.6.5

I noticed today when I tried to restart apache on my Mac that it had stopped working and gave me this error:

/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument

Luckily the world is a big place and someone had already fixed the problem.

Just open up /usr/sbin/apachectl and change (around line 64):

ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"



Continue Reading →

ActiveRecord::StatementInvalid: Mysql::Error: Got error 139 from storage engine

I ran into a 'fun' error with an application I've been working on. Everything was running fine and then one day hoptoad started filling up with exceptions like this:

 ActiveRecord::StatementInvalid: Mysql::Error: Got error 139 from storage engine 

I hate errors like that. Lucky for me there's Google: http://forums.mysql.com/read.php?22,63584,166521#msg-166521 http://bugs.mysql.com/bug.php?id=10035

Turns out that each row in mysql has a limit of 8000 bytes. A 'text' column takes up 768 bytes in the row after that it moves the data to an db external page. When you have Rails migrations you forget how many 'text' columns you have. Turns out I had 14:

14 x 768 = 10752 bytes

What's interesting is that you can get away with this setup until one day one of your users enters a lot of data. At that moment you will get the dreaded:

 ActiveRecord::StatementInvalid: Mysql::Error: Got error 139 from storage engine 

Time to refactor and break the table apart. I di...

Continue Reading →

SQL Server 2005 Express error: 40

I ran into this error while trying to run some scripts on my SQL Server 2005 Express Database:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Had to bang my head a bit on this one, but I finally figured out that all the scripts I was running referred to 'localhost'. By default Sql Server 2005 Express installs a named instance. I was too stupid/lazy to figure out how to rename it to default so I did a quick reinstall, chose the advanced setup options and set the database as default. Works great. Now if I could just get my stupid Dell 2850 server to stop locking up. In the future I will be buying Sun Servers.

Continue Reading →