Background: java provides an address. I use my local browser (WAMPServer IN THE ENVIRONMENT) to access this address. It is very fast and quick to get data. Now go to the production environment, I use cURL to access this address, send data, and then there is a big problem. Question: On the page...
Background: java provides an address. I use my local browser (WAMP Server in the environment) to access this address. It is very fast and quick to get data.
Now go to the production environment, I use cURL to access this address, send data, and then there is a big problem.
Specific problem: Click here on the page and send it to the address using cURL. I get the returned data. I thought it would be as fast as I tested locally, neither nor, some would be fast, and some would be slow, some of them are slow to death. I used Firebug to check that all the problems occurred are waiting for a long time, for example.
Thinking: I think the problem should not be in java. After all, it is very fast to access the data through a browser, so the problem can only occur in PHP. Is it a problem with cURL? Or is there any problem with server configuration? Please give more comments.
Reply content:
Background: java provides an address. I use my local browser (WAMP Server in the environment) to access this address. It is very fast and quick to get data.
Now go to the production environment, I use cURL to access this address, send data, and then there is a big problem.
Specific problem: Click here on the page and send it to the address using cURL. I get the returned data. I thought it would be as fast as I tested locally, neither nor, some would be fast, and some would be slow, some of them are slow to death. I used Firebug to check that all the problems occurred are waiting for a long time, for example.
Thinking: I think the problem should not be in java. After all, it is very fast to access the data through a browser, so the problem can only occur in PHP. Is it a problem with cURL? Or is there any problem with server configuration? Please give more comments.
You can take several more servers for testing and use the exclusion method.
I can return data at a normal speed after collecting the data myself.
For more information about similar remote calls, see SOAP.
It may be related to network conditions. 1. Check the network from the server to the machine of the java service and use ping in a simple test. 2. Check the DNS configuration of the server.