在为0个请求提供服务之后,超过128 MB的软私有内存限制(171 MB)

时间:2017-07-01 16:00:16

标签: google-app-engine google-cloud-platform google-cloud-storage

将数据加载到Google云端存储时出现以下错误。

我找到了几个相同的帖子,但想找到内存泄漏发生的地方。请让我知道如何找到。

错误讯息:

Exceeded soft private memory limit of 128 MB with 171 MB after servicing 0 requests total

代码:

def download_files(service, report_id, report_fragment):
  """Generate and print sample report.

  Args:
    service: An authorized Doublelcicksearch service.
    report_id: The ID DS has assigned to a report.
    report_fragment: The 0-based index of the file fragment from the files array.
  """
  print "Enter into download_files", report_id
  filename="/xyz/DoubleClickSearch_Campaign"+report_id+"_"+report_fragment+".csv"
  bucket_name="awstogcs"
  fname="DoubleClickSearch_Campaign11212"
  write_retry_params = _gcs.RetryParams(backoff_factor=1.1)
  gcs_file=_gcs.open(filename, 'w', content_type='text/plain',retry_params=write_retry_params)
  request = service.reports().getFile(reportId=report_id, reportFragment=report_fragment)
  gcs_file.write(request.execute())
  gcs_file.close()

谢谢,

0 个答案:

没有答案