您好我正在尝试通过执行从表存储帐户查询数据的 python 脚本来开始 Azure ML 算法。我用这个来做:
entities_Azure=table_session.query_entities(table_name=table_name,
filter="PartitionKey eq '" + partitionKey + "'",
select='PartitionKey,RowKey,Timestamp,value',
next_partition_key = next_pk,
next_row_key = next_rk, top=1000)
我在调用这段代码所在的函数时传入所需的变量,并通过在 Azure ML 中包含一个 zip 文件来包含该函数。
我认为错误是由于查询时间过长或类似的原因造成的,但它必须花费很长时间,因为我可能需要查询大量数据......我查看了这个 SO post Windows Azure Storage Table connection超时这是我认为关于达到这些查询的指定阈值的类似问题,但我不知道如何避免它。程序的运行时间只有大约 1.5 分钟才超时..
关于为什么会发生这种情况以及我如何解决它的任何想法?
编辑:
根据Peter Pan - MSFT的建议,我运行了一个更具体的查询:
entities_Azure=table_service.query_entities(table_name='#######',select='PartitionKey,RowKey,Timestamp,value', next_partition_key = None, next_row_key = None, top=2)
这返回了以下错误日志:
Error 0085: The following error occurred during script evaluation, please view the output log for more information:
---------- Start of error message from Python interpreter ----------
data:text/plain,Caught exception while executing function: Traceback (most recent call last):
File "C:\server\invokepy.py", line 169, in
batch odfs = mod.azureml_main(*idfs)
File "C:\temp\azuremod.py", line 61, in
azureml_main entities_Azure=table_service.query_entities(table_name='######',select='PartitionKey,RowKey,Timestamp,value', next_partition_key = None, next_row_key = None, top=2)
File "./Script Bundle\azure\storage\table\tableservice.py", line 421, in query_entities
response = self._perform_request(request)
File "./Script Bundle\azure\storage\storageclient.py", line 171, in _perform_request
resp = self._filter(request)
File "./Script Bundle\azure\storage\table\tableservice.py", line 664, in _perform_request_worker
return self._httpclient.perform_request(request)
File "./Script Bundle\azure\storage\_http\httpclient.py", line 181, in perform_request
self.send_request_body(connection, request.body)
File "./Script Bundle\azure\storage\_http\httpclient.py", line 145, in send_request_body
connection.send(None)
File "./Script Bundle\azure\storage\_http\requestsclient.py", line 81, in send
self.response = self.session.request(self.method, self.uri, data=request_body, headers=self.headers, timeout=self.timeout)
File "C:\pyhome\lib\site-packages\requests\sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "C:\pyhome\lib\site-packages\requests\sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "C:\pyhome\lib\site-packages\requests\adapters.py", line 382, in send
raise SSLError(e, request=request)
SSLError: The write operation timed out
---------- End of error message from Python interpreter
---------- Start time: UTC 11/18/2015 11:39:32 End time: UTC 11/18/2015 11:40:53
希望这能给情况带来更多的洞察力!