Skip to content

Commit

Permalink
temporarily increasing LCP_MAX_DOWNLOAD_TRIES default value from 40 t…
Browse files Browse the repository at this point in the history
…o 300 in a partial attempt to make lcp downloads more likely to finish

This will only be temporarily for while the LCP download service remains as crazy slow as it has been for the last two months. They're working on it, so hopefully it doesn't go on for too much longer.

But as it stands, this is just a partial fix because sometimes the lcp downloads have been working in 200 to 300 attempts, and sometimes up to 1000 attempts, and sometimes 5000 attempts isn't enough. For reference, the default 40 attempts seems to take about 2 minutes, 100 attempts 5 minutes, 200 attempts 8 minutes, 300 attempts about 10 minutes. I tried 2000 attempts and then 5000 attempts on a really bad time period, and it took 1.5 hrs and up to 2.5 hrs or so respectively, way longer than any of the more computationally expensive WindNinja runs.

for issue #515
  • Loading branch information
latwood committed May 28, 2024
1 parent 4994fba commit e25e38f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ninja/landfireclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ SURF_FETCH_E LandfireClient::FetchBoundingBox( double *bbox, double resolution,
*-----------------------------------------------------------------------------*/
int i = 0;
char *p;
int nMaxTries = atoi( CPLGetConfigOption( "LCP_MAX_DOWNLOAD_TRIES", "40" ) );
//int nMaxTries = atoi( CPLGetConfigOption( "LCP_MAX_DOWNLOAD_TRIES", "40" ) );
int nMaxTries = atoi( CPLGetConfigOption( "LCP_MAX_DOWNLOAD_TRIES", "300" ) );
double dfWait = atof( CPLGetConfigOption( "LCP_DOWNLOAD_WAIT", "3" ) );
const char *pszProduct = CPLStrdup( CSLFetchNameValue( options, "PRODUCT" ) );
/*
Expand Down

0 comments on commit e25e38f

Please sign in to comment.