Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

データインポート時にファイルサイズ上限でエラーになる #8

Open
terapyon opened this issue Sep 25, 2023 · 4 comments

Comments

@terapyon
Copy link
Member

本件は、このプロダクトとは関係が無いが、ファイルをアップロードする際に以下のエラーが出たので、対処方法を検討する。

[Zope.SiteErrorLog:35][waitress-3] BadRequest: http://localhost:8080/Plone/@@contents-import-controlpanel
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 181, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 391, in publish_module
  Module ZPublisher.WSGIPublisher, line 269, in publish
  Module ZPublisher.BaseRequest, line 638, in traverse
  Module Products.PluggableAuthService.PluggableAuthService, line 244, in validate
  Module Products.PluggableAuthService.PluggableAuthService, line 560, in _extractUserIds
  Module plone.restapi.pas.plugin, line 100, in extractCredentials
  Module plone.restapi.deserializer, line 8, in json_body
  Module ZPublisher.HTTPRequest, line 1058, in get
  Module ZPublisher.HTTPRequest, line 1370, in __get__
zExceptions.BadRequest: data exceeds memory limit

1MB以上だとエラーになる模様。

@terapyon
Copy link
Member Author

https://github.com/zopefoundation/Zope/blob/master/src/ZPublisher/HTTPRequest.py#L1427
このエラーになっているように見える。

@terapyon
Copy link
Member Author

FORM_MEMORY_LIMIT がどこかで設定されている可能性がある。

@terapyon
Copy link
Member Author

2か月前に、以下の変更が入っている。
zopefoundation/Zope@f62d0c9

@terapyon
Copy link
Member Author

変更が入っていて、1MBが設定されていた。

    <key name="form-memory-limit" datatype="byte-size" default="1MB">
      <description>
       The maximum size for each part in a multipart post request,
       for the complete body in an urlencoded post request
       and for the complete request body when accessed as bytes
       (rather than a file).
      </description>
    </key>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant