If setup incorrectly, ActiveCampaign’s import system can be incredibly slow. I put together some tips for ensuring you have the best settings possible.
- Make sure you are using INNODB for a table engine instead of MyISAM. The table level locking of MyISAM can make inserts very slow on import.
- Find and open your MySQL config file. On linux this is typically at /etc/my.cnf. On Windows this is typically a file in your MySQL folder named my.ini
- Add a line (or update if it is there) with the following:
innodb_flush_log_at_trx_commit=0
- Add a line (or update if it is there) with the following:
innodb_buffer_pool_size=1G
- Set the above size to 50% of the available memory on the server. In the above we set it to “1G” for if you have 2GB available on the server. If you have 8 GB on the server you could set this to “4G”
- You MUST restart MYSQL on the server for these changes to be used.
Posted in
Sysadmin,
Tutorial
The latest version of Google Analytics has a very nice feature called “Page Speed”. You’ll see the new tab underneath the content section…

I wondered why i had no data under site speed. After some research I found that I needed to modify the GA javascript to include a directive for page speed. You’ll need to add _gaq.push(['_trackPageLoadTime']); to the inline javascript as shown here..
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-858386-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_trackPageLoadTime']);
...continued...
</script>
After you save your modified file(s), you should begin to see data within 24 hours. Google tracks a small sample of pageviews and averages them all. You’ll see a page by page breakdown of speeds and how many times that page was sampled. This is helpful for finding outliers.

Pros: Nice data over time in a GUI with 2 seconds of work. Breakdown of individual page speeds.
Cons: Using this method fires an additional request to google for a second tracking pixel. Generally you shouldn’t notice this addition.
Posted in
Computers & Internet,
Sysadmin,
Web Development
I am frequently sent large zip files of photos or videos from clients, which I need to download and then FTP to their website. I decided today to find a different way to do this so I could bypass the long process of uploading GBs of files.

1) Go to your email from YouSendIt and right click on the download button. Copy this link.
2) SSH into your server.
3) Issue the “lynx” command to open a text-based browser
lynx https://rcpt.yousendit.com/1258529888/2f2b4adaf69882f770
4) Anytime you are prompted for a cookie or SSL error, just follow the prompt by pressing “y” or “Y”
5) Once the page loads, you just hit the down key until you get to the link to the file. Then hit the right arrow key to start the download.
6) exit lynx (ctrl + z)
7) locate the file that was downloaded. It’s likely in the folder you’re currently in.
unzip the file
unzip nameoffile.zip
Posted in
Computers & Internet,
Sysadmin,
Uncategorized
I have found that when running mysqlhotcopy to backup a database, it always throws an ominous looking error when finished.
DBD::mysql::db do failed: MySQL server has gone away at mysqlhotcopy line 528.
This type of error would lead you to believe the backup failed, when in actuality it worked just fine. I have restored from backups that resulted in this error just fine.
The solution to this error is to modify the system variables interactive_timeout and wait_timeout from the default settings. Inside your my.cnf file (usually located at /etc/my.cnf) put the following lines.
interactive_timeout=3600
wait_timeout=3600
You may have to adjust up for larger databases. These particular settings work for me with 15-20GB databases. Here is the result I get upon completion.
Copying 691 files...
Copying indices for 0 files...
Unlocked tables.
mysqlhotcopy copied 230 tables (691 files) in 416 seconds (417 seconds overall).
[root@mysql2 scripts]#
Posted in
Sysadmin
I ran into an issue today when our slave MySQL server was lagging behind the master. The error was that a certain table didn’t exist. I went into the master and looked for the table causing the issue. Normally there are 3 files for each database table when you’re using the MyISAM storage engine.
table_name.frm
table_name.MYD
table_name.MYI
The master machine only had 1 file
table_name.MYI
Hmmmmmm… what gives? I fired up PhpMyAdmin on the Master DB and noticed the table was using InnoDB storage instead of MyISAM. Ultimately I found this was caused by one of our devs adding a new table to the database using PhpMyAdmin, which was defaulting to InnoDB. My database backup method of choice (mysqlhotcopy) doesn’t function if any of the tables in the DB are using a different storage engine than MyISAM.
The solution: Edit you my.cnf file (typically located at /etc/my.cnf). Add the following line to set the default storage engine to MyISAM.
default-storage-engine=MYISAM
Tables already created with InnoDB will not be changed, but your “new table” dropdown in PhpMyAdmin should now show MyISAM as the default engine.
Posted in
Sysadmin