If you happen to have a Nginx upstream using AWS API Gateway, and gets this error 'SSL_do_handshake() failed (SSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure) while SSL handshaking to upstream' Here is the fix - you need to add 'proxy_ssl_server_name on;' in your nginx.conf. The directive is only available since version 1.7.0. Reference: proxy_ssl_server_name Syntax: proxy_ssl_server_name … Continue reading AWS API Gateway behind Nginx
Run query via Sumologic API
SumoLogic query can also be run via API. Here is a bash example that I wrote to get the nginx access logs. By default it searches the logs in the past 10 minutes, but you can overwrite it by adding a parameter. Here is the script. It is also can be found in my github. #!/bin/bash … Continue reading Run query via Sumologic API
Troubleshoot high CPU usage java process
This is a real troubleshooting example that I just did yesterday for a high CPU usage java application. The application uses tomcat and runs on AWS EC2. Login into the box, and change to root user so you can see all users' process. sudo su - Install htop if you have not installed it before, the run it. … Continue reading Troubleshoot high CPU usage java process
LuaXML_lib.so: wrong ELF class: ELFCLASS32
In a recent project, we use OpenResty (Scalable Web Platform by Extending NGINX with Lua) as API gateway. Nginx hosts the webserver, and Lua script stores the logic. One of our Lua files needs LuaXml modue to parse xml files. But the module is not installed by default in OpenResty. So we get this error … Continue reading LuaXML_lib.so: wrong ELF class: ELFCLASS32
Allow DELETE method pass payload in Akamai
We have a RESTful API endpoint for DELETE request sitting behind Akamai. And the DELETE request contains some data in the payload. By default, Akamai strips off the payload in DELETE method when you only turn on 'Allow DELETE'. To allow Akamai to pass the payload in DELETE method, you have to: Enable 'Allow All Methods on Parent Servers' on … Continue reading Allow DELETE method pass payload in Akamai