A lot of munmap and mmap

I have simple program: $_socket = stream_socket_client(…); while ($length > 0) { if (($block = fread($_socket, $length)) === false) { throw new SocketException(“Failed to read from socket.\n”); } $data .= $block; $length -= mb_strlen($block, ‘8bit’); } Systems information: Both instances are running on AWS. Both servers use the same version of the kernel(same AMI). Same…

Discover more

Attach NSG to Existing Subnet Using ARM Template

I’m looking to create a Network Security Group (NSG) in Azure and attach it to an existing subnet using an ARM Template. I’ve already come across this site: https://github.com/Azure/azure-quickstart-templates/tree/master/201-nsg-add-to-existing-subnet but the template references additional files on GitHub which my client won’t allow. Ideally i’d like to avoid nested ARM Templates if possible and just use…

Discover more

How to update existing manage packer image in Azure?

I have created a ubuntu image by following code { “builders”: [{ “type”: “azure-arm”, “subscription_id”: “XXXXXX”,XXXXXXXX “client_id”: “XXXXXXX”, “client_secret”: “06XXXXXXX”, “tenant_id”: “41X”,XXXXXX “managed_image_resource_group_name”: “myResourceGroup”, “managed_image_name”: “myubuntuPackerImage1234”, “os_type”: “Linux”, “image_publisher”: “Canonical”, “image_offer”: “UbuntuServer”, “image_sku”: “16.04-LTS”, “location”: “East US”, “vm_size”: “Standard_DS2_v2” }], “provisioners”: [{ “execute_command”: “chmod +x ; sudo -E sh ””, “inline”: [ “apt-get update”, “apt-get…

Discover more

python flask simple resetful api not just add 1 record user in sqlite database

i create a simple resetful api with flask and work corrent , but after add 1 record user details , don’t add next user or second user in database and give error 500. my code: @app.route(“/api/LicenseService/newcustomer”, methods=[“POST”]) def add_user(): try: data = request.get_json() new_user = User(username=data[‘username’], userid=data[‘userid’], product=data[‘product’], licenses=data[‘licenses’]) db.session.add(new_user) db.session.commit() return jsonify({‘Message’: ‘1×0001’}) except:…

Discover more

NGINX real_ip_header ignore IPv6

We have Nginx behind AWS cloudfront. For using real user Ip via $remote_addr paramter, we have implemented the suggestion in this article: https://blog.jayway.com/2014/03/28/how-to-get-the-client-ip-when-using-cloudfront-and-nginx/ It works fine, but we found that when the request is from IPv6, the $remote_addr paramter is using cloudfront IP instead of client ip. For example, request with this header: X-Forwarded-For: 1.1.1.1,…

Discover more

Windows Server 2016 Docker : IIS failed to start

Trying to run an IIS image on Windows Server 2016. When I try to run an IIS image, I get the following error and the container stops immediately. PS C:\Windows\system32> docker run -p 8000:80 mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2016 Service ‘w3svc’ has been stopped ERROR: Failed to start or query status of service ‘w3svc’ error [80004005] Service ‘w3svc’ has…

Discover more

Server returned http response code 413 for url – Application deployed on Websphere Application Server 9.0 Base version

My web application is deployed on IBM Websphere Application Server Base version 9.0. While a request is being sent from the application, we are facing an exception – “Server returned http response code 413 for url”. I have tried editing the “postSizeLimit” to “327680000”(earlier it was -1) in plugin-cfg.xml. But it did not help. Don’t…

Discover more