Increase number of files open for Pgbouncer

Pgbouncer is a lightweight connection pooler for Postgresql. It reduces the overhead of creating a new connection every time, instead it keeps a pool of connections open at all times which greatly reduces overhead. If you are doing a lot of connections per second, then Pgbouncer may complain that the open file limit has reached. …

Setting up Postgresql for the first time

If you have just installed Postgresql you may want to do the following things if you want to use psql(a command line utility for managing Postgresql) First let’s connect to our freshly installed Postgresql server by executing the following command Next let’s give a password to the postgres user, we do that by executing the …

Checking “open files limit” on Linux

Linux has a limit on how many files can be opened. Each process also has limits on how many files can be opened. You can check the limits of the process by doing the following steps Checking the file limits of a running process first you need to find the process id. You can do …

Binding local IP to Apache HttpClient 4

If you have more than two network cards on your machine and you would like to pick which one you would like to use with Apache HttpClient 4 then this guide will show you how to achieve it. We can set which NIC to use by constructing a RequestConfig object. Here is an example below …

Using ThreadLocal to access variables for each thread

If you would like to keep your variables’ values separate from different threads and would also like to access the variables without having to pass them as parameters then a good way would be to use the ThreadLocal. ThreadLocal is used for thread-local variables. Here is an example on how to use it. Create the …

Installing Wildfly 10 on Debian/Ubuntu

The instructions below are for Debian, but with Ubuntu you would also need to use ‘sudo’ if you are not running as root First you need to install Java, if you have not already. This page has instructions on how to install Java 1.8 using apt-get Installing Oracle Java 8 on Debian/Ubuntu Now let’s get …

Good free IMAP Library for C#.net

For some time I was using imapx, but sometimes it throws exceptions. I’ve checked their site and other people are having the same problem with no solution. So afterlooking for another imap library I found the ones below to work the best MailSystem.NET MailKit