Category Archives: Software

failed to create runc console socket: mkdir /tmp/pty064803763: no space left on device: unknown

Got this error today when trying to log into a docker container Then I tried which did not indicate any problem. /tmp is only 24% used. Above is showing all the inodes have been exhausted under /tmp. On listing /tmp … Continue reading

Posted in Software | Leave a comment

Understanding the internals of wordpress php-fpm-alpine image

This post describes the internals of wordpress:php7.4-fpm-alpine Docker image. The wordpress container does nothing but run the following command and wait for it to end which it never does as it spins up a server that listens for incoming connections … Continue reading

Posted in Software | Tagged | Leave a comment

Debugging File Upload Issues with WordPress

First make sure you have adequately increased the maximum file size that can be uploaded to wordpress. It is possible that uploads may still not work. On php-fpm-alpine image (and even on apache) wordpress runs under the credentials of www-data … Continue reading

Posted in Software | Tagged | Leave a comment

How to change the maximum file size you can upload to wordpress on nginx w/ php-fpm

Apache is a solid web server but my goto environment for wordpress has now changed to running it on Docker with NGINX + php7.4-fpm-alpine. To change the max file size you can upload to wordpress, you will need to make … Continue reading

Posted in Software | Tagged | Leave a comment

Complete guide to Azure AD Authentication in Node

There is a lot of documentation available on how to authenticate users against Azure AD. There are even libraries like MSAL.js that are supposed to do the job for you. Unfortunately, for me, I found the Microsoft documentation very noisy … Continue reading

Posted in Software | Tagged | Leave a comment

CloudFlare 522 Error. Server does not respond.

This is probably the longest time I have spent on debugging something (4 days) so its worth the effort to write about it. The problem: We built a wordpress site but got CloudFlare 522 error when trying to connect to … Continue reading

Posted in Software | Tagged | Leave a comment

Transactions and Locks in MySQL

Refer: https://stackoverflow.com/questions/61212438/why-do-we-need-to-lock-a-mysql-table-during-select-when-beginning-a-transaction/ TL;DR: MySQL docs are wrong Transactions act like a try-catch block. They don’t provide protection against concurrency. If something fails in a transaction, it can be rolled back to undo pending operations that were not committed. To handle … Continue reading

Posted in Software | Tagged | Leave a comment

A note on the dbDelta function

The dbDelta function documented at https://codex.wordpress.org/Creating_Tables_with_Plugins: The dbDelta function examines the current table structure, compares it to the desired table structure, and either adds or modifies the table as necessary, so it can be very handy for updates (see wp-admin/upgrade-schema.php … Continue reading

Posted in Software | Tagged | Leave a comment

Writing Your First WordPress Plugin

This post describes how to develop a WordPress plugin that can be used to count visits to a WordPress site. The basic idea is that we will create a table visitor_log in which we will store the timestamp, url_visited, ip_address, … Continue reading

Posted in Software | Tagged | 2 Comments

Backing up WordPress db

It is very important to backup wordpress db. This is done using mysqldump command. In the basic form: mysqldump -u wpreader –password=’password’ wordpress > backup.sql But we need to automate this and protect the password. This is done by following … Continue reading

Posted in Software | Tagged | 1 Comment