How-To: Handle large http header size

    Dapr has a default limit of 4KB for the http header read buffer size. When sending http headers that are bigger than the default 4KB, you can increase this value. Otherwise, you may encounter a service invocation error. You can change the http header size by using the dapr.io/http-read-buffer-size annotation or --dapr-http-read-buffer-size flag when using the CLI.

    This tells Dapr to set maximum read buffer size to 16 KB.

    1. apiVersion: apps/v1
    2. kind: Deployment
    3. metadata:
    4. name: myapp
    5. app: myapp
    6. spec:
    7. replicas: 1
    8. selector:
    9. matchLabels:
    10. app: myapp
    11. template:
    12. app: myapp
    13. annotations:
    14. dapr.io/enabled: "true"
    15. dapr.io/app-id: "myapp"
    16. dapr.io/app-port: "8000"
    17. dapr.io/http-read-buffer-size: "16"
    18. ...