Kubernetes getting same request multiple time - java

I've kubernetes cluster and My application is working on one pod. My application create some files and it sometimes took over than 5 min. and when it took so long pod create same request. I checked everywhere but actually I don't know how to search this problem it might releated with timeout or some thing like this but I'am sure it is releated with kubernetes. I've tried same application on docker container and I didn't see same problem in there. I'll be greatfull if you anyone help me. (kubernetes version is v1.18.5)
My expectation is get request only one time.

Related

Consistent 2 minute delay for multipart/form-data POSTs using Tomcat 8

I'm trying to get a server up and running on EC2 using Amazon Linux AMI 2017.09.0.2017. I've been able to set up a reverse proxy using Nginx at first and then just now Apache, and everything has been working fine except that something is causing a consistent 2-minute delay when I try to POST a multipart form. Everything goes through and works after 2 minutes, but it always takes 2 minutes for the server to do SOMETHING, what it is I don't know:
https://i.stack.imgur.com/YCpjV.png
I'm willing to be proven wrong, but I'm fairly certain that neither my nginx configuration nor my apache httpd configuration is at fault because I tested both of them individually and it happened under both of them, pointing to a problem with my Tomcat 8, SSL certificate, or possibly AWS configuration. I'm also confident that there isn't a problem with my javascript code that does the POST, because it works fine on an elastic beanstalk environment tomcat build.
This only seems to occur with multi-part form data POSTs, but that's not to say I know that nothing else is affected. I've tried monitoring TCP traffic and looking at error logs and nothing seems out of place, there's just a 2 minute delay that occurs before my java controller receives the form and I'm baffled.
Anyone have any idea what might be happening? Any ideas, vague or not, about leads or suggestions of things to do would be greatly appreciated.

How do I get Apache and tomcat docker containers to talk to each other?

I am a total newb at this and I want to learn. I have a webapp running in a docker container currently on Ubuntu 16.04TLS. I can connect to it over the Internet and it works fine. I want to run an Apache frontend in a separate container and enable SSL. I worked on this for 8 hours today and I know I was close. I had to restore the VM in the end so i could put the webapp back online.
I followed this tutorial https://medium.com/#jmarhee/running-multiple-web-applications-on-a-docker-host-with-apache-85f673f02803 and was successful at being able to connect to Apache (I got the default home page with the install) but was unable to get Apache to proxy for Tomcat. I got a 503 error when I enabled the proxy pass through. I am all about reading if you folks are good with pointing me in the right direction. Since I want to learn, I may come back with more questions. I did read another article http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach but I did not understand how to apply it to my situation.
TIA for any help you can provide me with.

Azure deployment hanging in Eclipse

I previously did not have any issues with this, as I have been deploying Azure web app from Eclipse with no issue. Usually it takes a few minutes, but currently it is taking forever with no real progress from what I can tell. I have tried restarting Eclipse as well as deleting the Azure app and recreating a new one. None of those work. Are there some settings I need to reset ?
EDIT: Yes it is a Web App created in Azure, and I previously had no trouble deploying at regular intervals. Last time however I wanted to abort the deployment and attempted to do so in Eclipse but it kept running and it seemed to be hanging so I shut down Eclipse and tried to deploy again but instead of taking just a few minutes, now it is stuck at the beginning with no progress.
I then decided to delete the web app, create a new one, and deploy to the new web app from Eclipse, but it is still the same with no progress.
EDIT: Adding Screenshots of the general environment and Azure configuration.
Just summarize for the above comments, the issue seems that Azure WebApp waits timeout to recover or reset for a failed deployment connection, so a suggestion is that trying to restart the Azure WebApp to recover or reset all status of the current instance fastly, or wait awhile then try to reconnect again.
But for some similar cases, if the above action failed, it's necessary for considering some metadata files in the current workspace, a valid way may be to create a new workspace to try to reconnect.

Service Availability issue

We are facing two general issues in our production env and would like to get recommendations.
We are using cluster of nodes running Jboss and apache web server for load balancing.
The two problems are,
All the server nodes work fine normally, however, suddenly within a minute, one of the node reach out the maximum DB connection limit (say, from 30 to 100) and start throwing errors (Unable to get manage connection).
I have seen that sometimes, we got simultaneously lot of same webservice calls from one user. For instance, more than 1000 web service calls of the same service by same user within a minute. It looks like, may be user is stuck in some kind of repetitive loop in browser (not sure).
To fix first problem, I have seen we don't have any connection leak issue. Mostly, we found that the service response time becomes very high, however the load balancer sends the equal traffic to each node and therefore possibly, this node might get exhausted. One solution I was thinking is to timeout the service call earlier which takes more than certain time but I am not sure is it good idea. Any thoughts, what recommendations/practice available to tackle such situation?
To fix second problem, I think the application should not defend or check for such large number of service calls but it should be in the higher level like firewall or web server. However, I would like to know your thoughts for this.
I hope my question make sense but if it doesn't, please feel free to ask,

Tomcat shutsdown at load test

On Ubuntu 12 server and Tomcat 7, I load test my spring mvc application for one specific REST get method. (using an online load test tool)
For 1 user per second and over a minute it works fine. But when I load test 50 users per second, after a short while tomcat shutsdown, so I have to restart it again. I checked logs but no error was there.
Where can I start to find the problem? Becoming slow, or unresponsive could be something that I could understand, but shuting down dont make sense.

Categories