Azure – Web App DNS issue

Hello there!

I have been driving a project which most of the components are run on Azure as PaaS and others as IaaS. Due to a service dependency, we built a point to site vpn to connect our Apps to our Azure VNet, and a site to site vpn to connect our VM‘s to to our on-premise. So our Apps are able to communicate to our on-premise through the tunnels. Lastly, we defined a custom DNS server ip address which points to one of our dns servers that run  on our on-premise.

https://docs.microsoft.com/en-us/azure/app-service-web/web-sites-integrate-with-vnet

vnetint-howitworks

The custom dns setting inherits  the VM’s inside the VNet. But not for the App.

At this point, we ran into a problem.Although the custom dns server ip address was set and displayed in VNet integration blade, it didn’t effect our App!  After a short dialog with Azure Support we were provided a solution 🙂

vnet

As you can see above , we added a variable settings  under the Application Settings of our web app. The value, of course, points to our on-premise dns server. The support guy that helped us gave us a promise to update the documentation 🙂

Cheers,

Wish you great week:)

AWS micro instances & mysqld deadlock

Hello all,

If you’re running mysql daemon on an AWS micro instance type AMI like me, you must already have undergone mysqld deadlocks day by day. I guess,   to move local mysql db to AWS RDS is the best solution in order to avoid this circumstance.

Creating a swap space is one of the solutions but you may have a limited storage on micro instances.Another solution would be to restart mysqld when it stops by cron jobs 🙂

crontab-syntax

Here is my bash script:

[ec2-user@ip-xyz-xyz-xyz-xyz filestores]$ more mybashscript
#!/bin/bash
if [[ ! “$(/sbin/service mysqld status)” =~ “start/running” ]]
then
/sbin/service mysqld start
fi

Don’t forget to give required permission for your bash file.

chmod +x /home/ec2-user/filestores/mybashscript 

And here is crontab (root crontab file!)You can access root crontab file by typing sudo crontab -e command

*/1 * * * * /home/ec2-user/filestores/mybashscript  –> Bash will run in every 1 minute.

That’s all, just give it a try. You can find different bash script on the Internet.

Wish you good and prosperity

Have a nice day.