Entries Tagged as 'admin'

Mysql on 32bit processor vs 64bit processor

Here is the continuation of the experiment done previously on Mysql on Windows vs Linux. After doing more analysis and observation, it appeared that the difference in speed for the benchmark tests were not related to Windows and Linux but were related to the processor. The previous test just happened to have AMD 64s on the Linux machines and Intel Xeon 32bits on Windows. We hypothesized that the increased throughput of the 64bit processors resulted in about half the time required to return the same query run on a 32bit machine.

View the previous results

So we decided to test the same query again on a Windows machine with an AMD 64 X2. This time the result for the query took 7.35 second, almost the same as the other AMD 64s running Linux.

One more test to run the query on a Windows Intel 64bit chip machine would better solidify our hypothesis.

Mysql server has gone away

I have a spider crawling the web written in PHP running constantly to insert and update data in a Mysql database.  Today, it kept stopping on a records with the error message, “Mysql server has gone away”.  It certainly did not time out as just starting the process again would result in this message immediately.  The script did not close out the connection to the DB as it had worked just fine for over a year.

Finally, I found that the problem was max_allowed_packet setting in my.cnf was too small.  It was set to 2MB and when Mysql receives a query larger than that, it assumes that something must have gone wrong and closes the connection.  I increased that parameter to 4MB and everything is working fine now.

Mysql SQL_NO_CACHE Benchmark Problem

I have been trying to benchmark the sql calls to mysql from an application without success. Even when I set the SELECT statement to SQL_NO_CACHE, the results seemed to be still cached. Apparently, Linux does its own caching of disk reads also. That was giving me incorrect benchmark results if I hit the same data twice.

For those using Linux kernel 2.6.16 or higher, you can clear Linux cache with the following command.
echo 3 > /proc/sys/vm/drop_caches

Unfortunately for me, I am stuck on 2.5.xx and will have to figure out another method.

zen cart Warning: session_start() No such file or directory (2) in /dir/public_html/includes/functions/sessions.php on line 102

The error comes up when trying to use file based session storage instead of database. Apparently, the configuration for what directory to store the session is not in the configuration files but in the database table “configuration”.

If you upgrade your php to version 5.2.1, the database session storage breaks. Therefore, I had to switch to file system based storage. But the catch was that I no longer could log into admin as the session could not start. The configuration.php files did not have this constant.

The way to fix this is to log into your database and update the session directory record.

“UPDATE configuration SET configuration_value=’/your/new/direcotory/’ WHERE configuration_title=’session directory’;”

System Specs:
php.5.2.1
zencart 1.3.5
apache 1.3.37
MySQL 5.0.45

Apache SSL IfDefine - Error

Just encountered a problem that was painful to deal with while configuring SSL on apache for linux.  The httpd.conf had a tag, , before all the SSL configuration lines.  In order for any commands within and to be loaded on service start, you must use the -D attribute like this.

$ service httpd -D SSL -k start

Also, I found that restart does not always take new changes to my conf files.

$ service httpd -D SSL -k restart

Instead, use the stop then the start command to be sure.

$service httpd -D SSL -k stop
$service httpd -D SSL -k start

That was a source of much pain while working on this particular server.