Be more verbose about internal (curl / timeout) errors.
Translates the CURLE_WRITE_ERROR into what it really means: that the low speed check failed.
This commit is contained in:
@@ -547,7 +547,7 @@ void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::str
|
||||
|
||||
fetcher->incrFetchCount(-1);
|
||||
|
||||
if (status==499) // timed out
|
||||
if (is_internal_http_error_that_warrants_a_retry(status)) // timed out
|
||||
{
|
||||
for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();
|
||||
folder_it != mRequestSD["folders"].endArray();
|
||||
|
||||
@@ -172,6 +172,7 @@ namespace LLMarketplaceImport
|
||||
|
||||
if ((status == MarketplaceErrorCodes::IMPORT_REDIRECT) ||
|
||||
(status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
|
||||
(status == MarketplaceErrorCodes::IMPORT_JOB_LOW_SPEED) ||
|
||||
(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
|
||||
{
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
@@ -228,6 +229,7 @@ namespace LLMarketplaceImport
|
||||
}
|
||||
|
||||
if ((status == MarketplaceErrorCodes::IMPORT_AUTHENTICATION_ERROR) ||
|
||||
(status == MarketplaceErrorCodes::IMPORT_JOB_LOW_SPEED) ||
|
||||
(status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT))
|
||||
{
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "llsingleton.h"
|
||||
#include "llstring.h"
|
||||
#include "llhttpstatuscodes.h"
|
||||
|
||||
|
||||
LLSD getMarketplaceStringSubstitutions();
|
||||
@@ -44,13 +45,14 @@ namespace MarketplaceErrorCodes
|
||||
{
|
||||
enum eCode
|
||||
{
|
||||
IMPORT_DONE = 200,
|
||||
IMPORT_PROCESSING = 202,
|
||||
IMPORT_REDIRECT = 302,
|
||||
IMPORT_AUTHENTICATION_ERROR = 401,
|
||||
IMPORT_DONE_WITH_ERRORS = 409,
|
||||
IMPORT_JOB_FAILED = 410,
|
||||
IMPORT_JOB_TIMEOUT = 499,
|
||||
IMPORT_DONE = HTTP_OK,
|
||||
IMPORT_PROCESSING = HTTP_ACCEPTED,
|
||||
IMPORT_REDIRECT = HTTP_FOUND,
|
||||
IMPORT_AUTHENTICATION_ERROR = HTTP_UNAUTHORIZED,
|
||||
IMPORT_DONE_WITH_ERRORS = HTTP_CONFLICT,
|
||||
IMPORT_JOB_FAILED = HTTP_GONE,
|
||||
IMPORT_JOB_LOW_SPEED = HTTP_INTERNAL_ERROR_LOW_SPEED,
|
||||
IMPORT_JOB_TIMEOUT = HTTP_INTERNAL_ERROR_CURL_TIMEOUT
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1780,7 +1780,7 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshLOD(mMeshParams, mLOD);
|
||||
@@ -1834,7 +1834,7 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshSkinInfo(mMeshID);
|
||||
@@ -1888,7 +1888,7 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshDecomposition(mMeshID);
|
||||
@@ -1942,7 +1942,7 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (status == 499 || status == 503)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
gMeshRepo.mThread->loadMeshPhysicsShape(mMeshID);
|
||||
@@ -1993,13 +1993,13 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
// << "Header responder failed with status: "
|
||||
// << status << ": " << reason << llendl;
|
||||
|
||||
// 503 (service unavailable) or 499 (timeout)
|
||||
// HTTP_SERVICE_UNAVAILABLE (503) or HTTP_INTERNAL_ERROR_*'s.
|
||||
// can be due to server load and can be retried
|
||||
|
||||
// TODO*: Add maximum retry logic, exponential backoff
|
||||
// and (somewhat more optional than the others) retries
|
||||
// again after some set period of time
|
||||
if (status == 503 || status == 499)
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //retry
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
LLMeshRepoThread::HeaderRequest req(mMeshParams);
|
||||
|
||||
@@ -203,16 +203,25 @@ void LLPanelPlace::setLandTypeString(const std::string& land_type)
|
||||
|
||||
void LLPanelPlace::setErrorStatus(U32 status, const std::string& reason)
|
||||
{
|
||||
// We only really handle 404 and 499 errors
|
||||
// We only really handle 404 and timeout errors
|
||||
std::string error_text;
|
||||
if(status == 404)
|
||||
if (status == HTTP_NOT_FOUND)
|
||||
{
|
||||
error_text = getString("server_error_text");
|
||||
}
|
||||
else if(status == 499)
|
||||
else if (status == HTTP_UNAUTHORIZED) // AIFIXME: Is this indeed the error we get when we don't have access rights for this?
|
||||
{
|
||||
error_text = getString("server_forbidden_text");
|
||||
}
|
||||
else if (status == HTTP_INTERNAL_ERROR_LOW_SPEED || status == HTTP_INTERNAL_ERROR_CURL_TIMEOUT)
|
||||
{
|
||||
error_text = getString("internal_timeout_text");
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unexpected error (" << status << "): " << reason << llendl;
|
||||
error_text = llformat("Unexpected Error (%u): %s", status, reason.c_str());
|
||||
}
|
||||
mDescEditor->setText(error_text);
|
||||
}
|
||||
|
||||
|
||||
@@ -1369,14 +1369,21 @@ bool LLTextureFetchWorker::doWork(S32 param)
|
||||
if (mRequestedSize < 0)
|
||||
{
|
||||
S32 max_attempts;
|
||||
if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == 499)
|
||||
if (mGetStatus == HTTP_NOT_FOUND || mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
{
|
||||
mHTTPFailCount = max_attempts = 1; // Don't retry
|
||||
if(mGetStatus == HTTP_NOT_FOUND)
|
||||
llwarns << "Texture missing from server (404): " << mUrl << llendl;
|
||||
else if (mGetStatus == 499)
|
||||
else if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT || mGetStatus == HTTP_INTERNAL_ERROR_LOW_SPEED)
|
||||
{
|
||||
llwarns << "No response from server (499): " << mUrl << llendl;
|
||||
if (mGetStatus == HTTP_INTERNAL_ERROR_CURL_TIMEOUT)
|
||||
{
|
||||
llwarns << "No response from server (HTTP_INTERNAL_ERROR_CURL_TIMEOUT): " << mUrl << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Slow response from server (HTTP_INTERNAL_ERROR_LOW_SPEED): " << mUrl << llendl;
|
||||
}
|
||||
SGHostBlackList::add(mUrl, 60.0, mGetStatus);
|
||||
}
|
||||
//roll back to try UDP
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
}
|
||||
|
||||
// *TODO: 404 = not supported by the grid
|
||||
// *TODO: increase timeout or handle 499 Expired
|
||||
// *TODO: increase timeout or handle HTTP_INTERNAL_ERROR_* time errors.
|
||||
|
||||
// Convert config to LLSD.
|
||||
const Json::Value data = root["data"];
|
||||
|
||||
@@ -52,4 +52,7 @@
|
||||
<string name="server_forbidden_text">
|
||||
Information about this location is unavailable due to access restrictions. Please check your permissions with the parcel owner.
|
||||
</string>
|
||||
<string name="internal_timeout_text">
|
||||
Information about this location is unavailable due to a network timeout, please try again later.
|
||||
</string>
|
||||
</panel>
|
||||
|
||||
Reference in New Issue
Block a user