我尝试将$query = "SELECT * from User";
$options = array
(
'hostname' => SOLR_SERVER_HOSTNAME,
'login' => SOLR_SERVER_USERNAME,
'password' => SOLR_SERVER_PASSWORD,
'port' => SOLR_SERVER_PORT,
'path' => SOLR_SERVER_PATH,
);
$result = $mysqli->query($query);
if($result->num_rows > 0)
{
while($row=mysqli_fetch_assoc($result))
{
$querySearch = '+username:*'; //query all user that is on solr
$query = new SolrQuery();
$query->setQuery($querySearch);
$query->setStart(0);
$query->setRows(10000);
$client = new SolrClient($options);
$query_response = $client->query($query);
$query_response->setParseMode(SolrQueryResponse::PARSE_SOLR_DOC);
$response = $query_response->getResponse();
$doc = new SolrInputDocument();
$counter = $response->response->numFound;
for($x = 0; $x < $counter; $x++)
{
$doc = $response->response->docs[$x]->getInputDocument(); //this gets the old value (refer to thread)
$docs = $query_response->getResponse()->response->docs[$x]->username->values; //how I get the value of users
$second_doc = new SolrInputDocument();
if($docs == get_product($row['USERNAME']))
{
$second_doc->addField('points', $row['POINTS']); //this suppose to update my solr document with those username found
}
else
{
$second_doc->addField('points', "0");
}
$second_doc->merge($doc);
$updateResponse = $client->addDocument($second_doc);
$client->commit();
}
}
文件中的应用程序的超时设置为httpd.conf
秒。但它似乎在1200
秒后超时。
这就是我300
中的情况,并且我已在全球范围内以及httpd.conf
之外提供
<VirtualHost>
我也在Timeout 1200
文件中进行了相同的更改。是否有其他方式我可以配置超时?
答案 0 :(得分:1)
在我的应用程序中,由于Apache是负载均衡器而Weblogic是我的服务器,因此我必须在WLIOTimeoutSecs 1200
文件中添加/修改此更改
public string GetEnd (string input, int n)
{
return input.SubString (input.Length - n, n);
}
这一改变对我有用。