Ubuntu 18.04 MariaDB 10.2 Too many open files

On my computer running Ubuntu 18.04, MriaDB stopped working. PHP application i run on my computer failed with error

Application can’t find the table. So i tried to login to MySQL and see if table is there or not. But i get error

Next i checked if this is due to any MySQL upgrade. I found MySQL got updated today

To fix this error, run

This wil open a text editor. Add following

Save and quit the editor. Restart MaraDB with

MySQL will work properly now. systemctl edit mysql will create file /etc/systemd/system/mysql.service.d/override.conf

CloudLinux PHP Selector on Cpanel Server

CloudLinux come with PHP Selector, this allow you to select differnt PHP versions. When you enable PHP selector, you should do the following.

Related Posts

Enable CloudLinux PHP lsapi

OpenLiteSpeed Benchmark


OpenLiteSpeed is open source version of popular commercial web server LiteSpeed. OpenLiteSpeed contains all of the essential features found in LiteSpeed Enterprise.

You can get OpenLiteSpeed from

Here is a benchmark from OpenLiteSpeed web site that compare OpenLiteSpeed with Nginx.

OpenLiteSpeed Benchmark

OpenLiteSpeed configuration file

To start/stop/restart, use

OpenLiteSpeed web server stores cache in directory /usr/local/lsws/cachedata. This can grow big overtime. You can delete this folder to free up space or move it to another partition with free disk space and create a symlink.

Related Posts

Install OpenLiteSpeed on CentOS

LiteSpeed Web Server

Web Server

Linux whois command

Linux whois command is used to find who owns a domain or IP address.

To see information about a domain, use


To find information about an IP address, use


whois ip address

Related Posts

Linux Commands

Set hostname in CentOS 7

Hostname is a sub domain. To set hosting, edit file



Now run



Edit file

Edit or add HOSTNAME entry

Reboot the server with

You can verify hostname with command

Related Posts

Change Server Hostname in VestaCP
Set Permanant hostname on AWS EC2 CentOS 7 server
Install SSL for Cpanel Server Hostname

Check if HTTP/2 enabled using curl

To see if a web site have HTTP/2 enabled, you can run

If you see 2, the site have HTTP/2 enabled.


Here is a site with no HTTP/2

wget print content to screen

wget is used to download files. When you use wget to run cronjob, it create lot of files. To avoid this, you can replace wget command with curl.

If you want to use wget, you can use -O option, that speicify file to save. You can use -O /dev/stdout, so downloaded file content will be written to stdout.

You can use -q to hide the download progres message (quite).

-O /dev/stdout can be replaced with



See wget

CentOS 7 VestaCP Upgrade PHP to 7.x

On CentOS 7 VestaCP install PHP 5.6 by default. This is very old version of PHP. To upgrade PHP to latest version 7.x, you can install remi repo.

Install EPEL repo

Install yum-utils

Install remi repo

Select PHP version you need

Here i selected PHP 7.3. You can select differnt PHP versions with commands like.

Make sure you only enable one PHP version. If you enabled a PHP version from remi repo, disable it with

Once you have desired version enabled, run yum upgrade

Or only for PHP, run