You use supervisord to manage your docker startup services, then you see a bunch of errors like this 2023-02-15 13:15:11,983 INFO reaped unknown pid 475 2023-02-15 13:15:15,452 INFO reaped unknown pid 486 2023-02-15 13:15:15,823 INFO reaped unknown pid 493 2023-02-15 13:16:02,366 INFO reaped unknown pid 506 2023-02-15 13:17:02,045 INFO reaped unknown pid 524 2023-02-15 13:18:01,205 INFO reaped unknown pid 53 The fix is to update your /etc/supervisord.conf , add or change the “loglevel=error” [supervisord] nodaemon=true logfile=/tmp/supervisord.log pidfile=/var/run/supervisord.pid user=root loglevel=errorRead More →

You setup a new website, everything looks good. You were advised to setup a probe to monitor your application. You did, days by days the application works great, you look at your monitoring report , things are normal. One day, you receive an alerts saying your application is not accessible. When you visit your application, it seems fine. Something wrong with the monitoring you setup? It could be , but if you take a deep dive , you see that your application is receiving a huge load from random IPs. You know that there must be something wrong going on, when you review all theRead More →

By default, when you deploy an application to Azure App Service plan – your default web location will be under /home/site/wwwroot . /home/ is a persistent storage which means if you restart your application, your data will be still there. The problem with /home folder is that, it’s actually a network folder , which means every time you want to access files on this folder, it will do a network call. Some applications using some framework like Symfony , their library is huge, they read a lot of files , this will cause your application is very slow to respond. How do we fix this?Read More →

My advice is if you have a growing fast/busy table, you should keep it below 4GB, if it’s over 4GB, you should find away to archive it. This will need some helps from the code as well. Why shouldn’t you let it growing more than 4GB? It’s because sometimes your server crash, mysql might need to recover/repair the table. If the table is too big, it will take a lot of time to repair. While the table is repairing, you will be unable to access that table, this will put everyone in a long queue. Just imagine that you have a busy and it takesRead More →

I have a query: | curl uri=https://myserver/users_list.json | table curl_message | eval curl_message=”{\”body\”:” + curl_message + “}” | spath input=curl_message output=b path=body{} | mvexpand b | eval _raw=b | extract | fillnull value=”None” | table name,email,role Then i got this mvexpand gives “mvexpand output will be truncated due to excessive memory usage” My fix is to remove some fields not necessary : | fields – _raw,curl_message | curl uri=https://myserver/users_list.json | table curl_message | eval curl_message=”{\”body\”:” + curl_message + “}” | spath input=curl_message output=b path=body{} | fields – _raw,curl_message | mvexpand b | eval _raw=b | extract | fillnull value=”None” | table name,email,roleRead More →

var waiting_text=”Basic Data”; var max_waiting_time=30;//seconds for(i=0;i<max_waiting_time;i++) { body_text= await driver.findElement(webdriver.By.tagName(“body”)).getText(); if(body_text.includes(waiting_text)) { console.log(“Found required text[“+waiting_text+”] at the “+i+”th seconds, exiting the waiting “); break; }else{ await commands.wait.byTime(1000); } } if(i>=max_waiting_time) { console.log(“Coul not find text[“+waiting_text+”] at the “+i+”th seconds, exiting the waiting “); }Read More →

When you run git status , you see the screen below Changes not staged for commit: (use “git add <file>…” to update what will be committed) (use “git checkout — <file>…” to discard changes in working directory) (commit or discard the untracked or modified content in submodules) modified: app (modified content, untracked content) modified: lib (modified content, untracked content) No mater how you add these files (git add *) , the files are still not being committed or staged. Root cause: it’s because these folder has .git folder in side.Fix: remove .git folder find ./ -depth -mindepth 2 -type d -name .git -exec rm -rfRead More →

Azure stop supporting PHP7 in early 2023, for any reason you still wants to run PHP7, there is a way. Azure still allows us to run PHP7, this can be done via cli or using Azure Devops to deploy to php7.4 , Php 7.4 is the oldest version they allows. So, if you want to have PHP7 , PHP 7.4 is your only choice and you need to provision your resource via azure cli or devops pipelines. this can’t be done via Portal web interface. After you provision it, if you open in web interface, you might see it looks like this.Read More →