Here I have digital ocean server + Laravel 5.8 Project set up with + Mysql + Redis + Pusher Echo Events.
Backend : Laravel
Frontend : React
Server Configuration : 16 GB Memory / 50 GB Disk / LON1 - Ubuntu
18.04.3 (LTS) x64 #doydoy
The server is facing big traffic everyday.
So Found the issue like pusher's socket is taking much memory and cpu usage which causes server low in performance and which impacts on website traffic as well.
So how can I speed or improve it ?
I have used frontend event.listeners() to auto refresh the changes.
So sometimes it might call another API to get updated state.
Here is the graph for it.
Pusher Graph
CPU graph
Related
hi there i am trying to deploy laravel project on my deticated server which has two processors about 32 core and 128 giga ram
i am using apache longue as web server and using mpm winnt (this is the allowed mpm for windows
my problem is when i testing using jmeter i get about 90% of requests quicly but the rest requests take too long time to response and i can not understand why ??
it seems like those requests hold in queue but i really dont no why
my winnt conf is
<IfModule mpm_winnt_module>
ThreadsPerChild 1920
MaxConnectionsPerChild 1000000
</IfModule>
i am trying to get 2000 request per second
I have a high performance softlayer server. I am only running a (php-based. It's not an IRC server) chat room on this server. It works all fine. On average server response (for chat room) is 100MS with 100+ concurrent users. Some days ago a user threat to ddos our server. Now the server is so slow. On average ping time is 1500-2000MS with just 50-60 users. There is no high resource usage or bandwidth usage. I did following things to protect my server:
1 - DDOS protection (softlayer providers it)
2 - Install mod qos and evassive for appache
3 - Disabled ping of death and Syn packets
I performed following analysis:
1 - Analyzed apache logs. There isn't any frequent request from same IP or CLRF packets.
2 - Not many UDP packets
3 - Checked connections per IP and they are all normal.
However, nothing is working. That user threats and kills our time whenever he says/wants. Is there any other thing I should look into to protect my server? What kind of attack he could make to do this?
My guess is going to be they are exhausting your apache workers (usually a default of 150), you might want to check to see how many apache threads are currently running, and if its ~150 that might be why you have slow response times.
Some good reading on apache performance tuning.
http://httpd.apache.org/docs/2.2/misc/perf-tuning.html
http://www.monitis.com/blog/2011/07/05/25-apache-performance-tuning-tips/
https://www.devside.net/articles/apache-performance-tuning
The output from the following commands might also be useful in figuring out whats going on.
See whats running
ps auxf
See what apache is doing by turning on server-status (http://httpd.apache.org/docs/2.2/mod/mod_status.html)
apachectl fullstatus
See whats going on with network connections
netstat -npl
Anyway, I hope that helps point you in the right direction.
I have an application which exposes a web service on which I am trying to do a load test.
It works for few concurrent users without any issue.
When I increase the user count to 30, I simply get this error in JMeter within 100 milli seconds.
Non HTTP response code: java.net.SocketException - Non HTTP response message: Connection reset
[I thought my JMeter config was wrong - but one of the web application which uses this web-service also failed consistently around that time saying the service was unavailable. So, server itself has some issue].
I checked the web service - application log - No exception & very clean.
CPU, Memory utilization of server is also very normal on the server machine.
However, 'Context Switch' & 'Device Interrupts' are increasing under load.
Context Switch is avg 1500/sec under heavy load. Normally It is 500/Sec.
Is this bad? Is it what makes my application perform badly? I have no clue to resolve this issue.
Note: It is JBOSS server
I am debugging a very odd problem I noticed when testing in my own network. (It doesn't appear to happen on other servers outside my network) where random http requests fail.
I have tried it on two apache servers on my network, and it happens about 1 out of every 100 requests with 2 different apache servers.
I thought it was front-end related, but it appears something to do with my internal network OR configuration. I installed Charles proxy on my machine and used my phone to make the requests in the appellation. (Ajax)
The ajax/http request is being made but it is never making it into my access logs and I am getting the error "Remote Server closed the connection before sending the response header"
How can I debug this further?
NOTE: Also worth noting I can only reproduce problem on mobile iPhone + iPad devices when connecting to the server on the machine. (EVEN when using http proxy...which is very odd)
EDIT:
I did a wireshark capture for port 80 from the server computer and accessing it from iPhone. I am having a hard time interpreting it.
Here is the link to the capture files:
CAPTURE 1 (iOS 8 iPhone):
https://www.dropbox.com/s/1ipruv3wlmgng5o/http%20capture%20bad.pcapng?dl=0
NOTE: The error happens after the LAST post to sales/add_payment
CAPTURE 2 (iOS 8 iPhone):
https://www.dropbox.com/s/4zu3654uh9l6230/http%20capture%20bad%202.pcapng?dl=0
NOTE: The error happens after the LAST post to sales/complete
CAPTURE 3 (Android 4.4):
https://www.dropbox.com/s/8xtwkbewce02psw/http%20capture%20android%201.pcapng?dl=0
FOLLOW UP:
If it is indeed faulty network equipment, how do I determine what is bad? (device, router, modem?)
Ive been constantly getting the same error,like
"HTTP 403.9 - Access Forbidden: Too many users are connected Internet Information Services Technical Information".
I went through this site and found this command ->
"C:\Inetpub\AdminScripts\adsutil set w3svc/MaxConnections 40" to set maximum connections.Even after running this command I still have the same error.
Im using IIS V.5.1,Oracle 10g,IE 9.0.
Is there a better way to fix???
Use a bigger number.
If you've got enough money to pay for licencing MS IIS and Oracle then you should be able to afford hardware to support more than 40 concurrent requests (not got your setup / code here to test - I'd expect that the cheapest PC I could buy today would support over 500 concurrent connections running Linux,Apache and MySQL/Postgress).