AWS RDS Aurora max_connections limit

February 15th, 2018 No comments

For our office products, we are using Amazon Cloud. For the database, we prefer to use Amazon RDS (Aurora). Recently one of our sites was showing lots of error message in The error log shows it was because of MySQL denied to connect for too many open connections. This is when we checked the RDS max_connection limit and found its related to the size of your RDS instance. So we tested the max_connection limit for different size instances. And here is the result:


aurora max connection limit small 45


aurora max connection limit medium 90


aurora max connection limit large 1000


aurora max connection limit xlarge 2000


aurora max connection limit 2xlarge 3000


aurora max connection limit 4xlarge 4000


aurora max connection limit 8xlarge 5000

Forcing ssl to particular page and non-ssl to other pages

March 14th, 2013 2 comments

In projects we may need to make sure some of the urls are only accessible from ssl (https). It’s really useful for user sections. And rest of the url should browse from non-ssl (http) link. It can be done with a small htaccess rules.

Here is htaccess hack to do:

#SSL for some pages
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_FILENAME} !index\.php$ [NC]
RewriteCond %{REQUEST_URI} ^/(signin|signup|account) [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

In this block we are checking for ssl off and some url, if match we redirect the user to same url in ssl version.

#SSL off for some pages
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_FILENAME} !index\.php$ [NC]
RewriteCond %{REQUEST_URI} !^/(signin|signup|account) [NC]
RewriteCond %{REQUEST_URI} !^/(api) [NC] #allow this url from both ssl and non-ssl
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

In this block we are checking for ssl on and some url, if match we redirect the user to same url in non-ssl version. Here u may notice we are using a extra check ( RewriteCond %{REQUEST_URI} !^/(api) [NC] ) , it’s because in project we may need some url those accisable from both ssl and non-ssl.

TotalFinder – the missing file manager for mac os x

August 28th, 2012 No comments

Its been around 5 years i am using mac os x. I really love the most features of mac os x, except finder (the default file manager), it’s still missing lots of important functionality like cut, duel panel, folder on top etc etc.

So to fix these missing features problem i was looking for a good solution and few months ago found a very good solution for it, called “TotalFinder – brings tabs to your native Finder and more!“. I really loved it.

The features i liked most:

1. Cut & paste : You will able to use Cut and paste feature, even with keyboard shortcut.

2. Dual mode: If you are a old “total commander” fan, then you know what it means. You will able to use finders parallel. It really helps when you are moving files from one folder to another.

3. Tabbed Browsing: You browse all your folders in a single window.

4. Folders on Top: Your finder stay on top of the other window.

There are more features, but i really love these features.

Check their site for more details TotalFinder

Categories: General Tags:

Macports – Your ultimate friend for developers

March 13th, 2012 No comments

Its been long time i last wrote any post here. Today I am going to show you some use of macports.

Macports – One of the best package manager for mac os x. Its specially helpful for advance user like us, who needs to install lots of *nix packages. And also for developers, to maintain their tools, like apache, php, python, ruby, vi, emacs etc etc. So either you are a advance user or developer, u will like this post.

Here we go:

To use macports, the very first thing you will need to install is the gcc compiler and its helping tool. Don’t get afraid, in mac its very simple to get these tools. Just install the Xcode from your 2nd install DVD, if you don’t have the DVD, you can download it from apple site. it’s free 🙂

After the Xcode is installed get the macports installer dmg from Mount the dmg and run the installer. it’s damn simple, but you may have to wait 10-20 minutes to complete the installation (based on your mac configuration).

Congratulation!!! your install processing complete. Now how you will use it.

Install package:

$ sudo port install portname

Searching package:

$ port search packagename


A very good feature of macports, you can choice what will be configured/installed along with this package. Like if your installing php5 , you may tell the installer to configure it for apache or fastcgi mode or no_web . That’s the best part of macports. You can pick what you need, and what not. Here is the command format:

$ sudo port variants packagename

this command will give you a possible variants list. you will have to +variants_name after the normal ports install command.

$ sudo port install packagename +variants1 +variants2

Upgrade package:

Upgrade is one of the important reason of using package manger, instate of installing everything separately. You will get all your installed packages almost without any effort.

upgrade a single package:

$ sudo port upgrade packagename

this command will upgrade the package along with the pre-selected variants (if any)

upgrade all packages:

$ sudo port upgrade outdated

This command will upgrade all the outdated application/package to the latest version (of-course you will have to sync ports repo, that i described later.)

Port maintenance:

Though most of the task here, you will do very few time in 2-3 months, but still i am showing it here. As we run one single os for years 🙂

Update repository:

To get the latest changes from port repository. The command is very simple:

$ sudo port sync

Remove inactive ports:

One of the good and bad side of macports is, when u upgrading any existing package, it keep the old versions of the package. After few months of use of macports you may feel the need to clean up the space. Here is the single line command to do it.

$ sudo port uninstall inactive

Cleanup ports:

In long run macports store lots of helping files for the compile process. You may like to run this command sometime after 1-2 months to cleanup some space.

$ sudo port clean –all installed

upgrade macports:

Its even simpler to upgrade your installed ports with single command

$ sudo port selfupdate


or you can check which ports are outdated by running :

$ sudo port outdated


I wrote this post after long time and in very hurry, so there can be some issue or i may missed something. Please let me know, i will fix those.

Spring festival 2012

February 21st, 2012 No comments

Last 13th February was the first day of spring. Here in bangladesh we do spring festival to welcome the spring 😀 . As I am doing photography a-lot these days, i tried to capture the festival in my frame as much as possible. Here is some of the pics.

* I am adding more pictures almost every day. so don’t forget to come back again or add me in flickr.
* all picture have individual flickr link, click on the link to see large version.

Stop referrer spam on your site

February 14th, 2011 12 comments

As i was checking WassUp stats of my blog, suddenly i found that my blog got 71 visits from some external sites (referrer) in last 24 hours. First my felling was “WOW, so may referrer”.

referrer spam

referrer spam

*screenshot: showing external referrer excluding search engines.

Later after i check some of those referring sites, i found these are just some sites, that using my site to get better position in site ranking. It’s call “referrer spam”. From wikipedia:

Referrer spam (also known as log spam or referrer bombing[1]) is a kind of spamdexing (spamming aimed at search engines). The technique involves making repeated web site requests using a fake referrer url that points to the site the spammer wishes to advertise.[2] Sites that publicize their access logs, including referrer statistics, will then end up linking to the spammer’s site, which will in turn be indexed by the search engines as they crawl the access logs.

This benefits the spammer because of the free link, and also gives the spammer’s site improved search engine ranking due to link-counting algorithms that search engines use.

Though these visits will not loss you any thing, but it will just waste your server resource. And also if you show some stats on your site like referrer, then your visitors will get some wrong links.

Ok lets see how we can stop them. I searched on net, but didn’t got any good solution. So here is my solution.

Just add these lines to your .htaccess file and smile.

Order Allow,Deny
Deny from
Deny from
Deny from
Deny from
Allow from all

Here i use ip to block/stop this abuse, because after some research i fount this is happening from just particular ips, means those ips running some scripts to do this. Its semi manual way (still looking for better way). Just get these ips from your access log or any 3rd party plugins or apps. then add “Deny from newip” before Allow from all .

That’s all . If you know any better option please share with us.

Make/converting eot from ttf in mac os x & linux

February 7th, 2011 3 comments

As i work with some bangla sites, it’s very common problem for me to create eot of bangla true type font. Today i got a really simple solution. Now (As just learned the system) you can create or convert eot from any ttf font from mac or linux with simple one line command.

$ ttf2eot < fontname.ttf > fontname.eot

That’s all!!!! .

Wait, little work left, you have to install ttf2eot :
in mac os x: sudo port install ttf2eot
linux : download the latest source from , extract it, then run make in the extracted folder. then you good to go. “./ttf2eot < input.ttf > output.eot”

Set/change default application on mac os x

October 5th, 2010 1 comment

Are you bored with clicking the right click every time to select your fav application to open a file ? At least i am , i like VLC very much and using it for last few years as my media player.

After searching on google i got a very good application to that and plus is it’s free 🙂 , and the site – RCDefaultApp

more data from their site

RCDefaultApp is a Mac OS X 10.2 or higher preference pane that allows a user to set the default application used for various URL schemes, file extensions, file types, MIME types, and Uniform Type Identifiers (or UTIs; MacOS 10.4 only). MacOS X uses the extension and file type settings to choose the application when opening a file in Finder, while Safari and other applications use the URL and MIME type settings at other times for content not related to a file (such as an unknown URL protocol, or a media stream).

RCDefaultApp also allows setting the application when digital cameras or FireWire webcams such as iSight are connected to the computer. For completeness’ sake, there are also settings that mimic the existing “CDs and DVDs” preference pane, which allows setting the action to take when various types of CDs and DVDs are inserted into the computer.

This screenshot shows the section where the default application for various Internet services can be set, similar to the preference in and

This shows how to set the application for an extension; just pick the desired application from the list.

This shows the section to set the action for when various types of media are inserted or turned on, similar to the preference in Image and The CD and DVD preferences are also duplicated here with easier access to the “Perform action at login” setting.

This shows the section where each application’s possible settings can be seen and assigned at once. The small button in the bottom right is for RCDefaultApp “About” information.

This shows RCDefaultApp as it appears in System

Got iPad

September 11th, 2010 2 comments

After waiting for so long, we got my iPad. You can’t believe how much happy We are.

Thanks goes to my friend shanaz kanon apu and here husband for bring this iPad from japan.

It’s an gift to my wife Tania sabnam.

Right now writing this post from iPad. Will upload real photo soon.

Categories: My Computer Tags: ,

playing too much games

May 16th, 2010 4 comments

I am also feeling myself that i am playing too much computer game. i should stop now. lot’s of my pet projects are pending, even the avro team waiting for me to submit the avro linux version code to debian/ubuntu repository 🙁 . i should should stop now.

Anyway let me share you which game i am playing now a days.

1. AOE2 – ( though its a very old game, but still i love it. it prove that “old is gold”

2. AOE3 – ( it’s my second fav 🙂 i like the deck 🙂

also playing some other game, will add more on next post, again going to play aoe3 🙂

Categories: games Tags: , , ,
76 queries in 0.123 seconds