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

Uncaught DOMException: Quota Exceeded #98

Closed
MattieX opened this issue Sep 2, 2021 · 7 comments
Closed

Uncaught DOMException: Quota Exceeded #98

MattieX opened this issue Sep 2, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@MattieX
Copy link

MattieX commented Sep 2, 2021

Current Setup

  • Notea Docker Image with Minio as S3
  • Accessing Notea via Caddy Reverse Proxy with no extra headers for isolating this identified bug
  • Tested with Latest Updated Version v0.3.5
  • Tested in Chrome, Edge & Firefox

Describing the Issue

When opening numerous pages one after another, eventually a red error with no context will animate and loop at the bottom of the screen as the page continually jumps about - making typing or viewing notes impossible.
Screenshot 2021-09-02 210820

Checking the web console I see the following messages when this happens.
Screenshot 2021-09-02 210620

Googling the issue points to application storage being exceeded - checking the Storage tab when this shows this is the case. Each new page opened seems to almost (but not always) increase this storage quota, sometimes exceeding it.

Screenshot 2021-09-02 210719

In order to fix this issue I have to Control + Refresh in chrome or to manually clear the cache on the storage tab.

@QingWei-Li QingWei-Li added the bug Something isn't working label Sep 3, 2021
@QingWei-Li
Copy link
Collaborator

Will there be this problem with http://ip:3000? I guess it may be a proxy server configuration issue.

@MattieX
Copy link
Author

MattieX commented Sep 5, 2021

Will there be this problem with http://ip:3000? I guess it may be a proxy server configuration issue.

So I tried binding the container to the host and accessing directly via port 3000, disabled COOKIE_SECURE and you're right, the Storage seems to sit between 1-3MB when moving between pages as opposed to very quickly getting to several hundred MB and hitting the Quota, pointing to a likely reverse proxy issue as you suggest.

However, I'm unsure as to what could be causing this with the reverse proxy, as I access other reverse proxied services fine utilising the same approach as shown below.


When using my domain for https the docker-compose for Notea file contains:

environment:
  - COOKIE_SECURE=true
  - BASE_URL=https://note.mydomain.com
  - STORE_ACCESS_KEY=<MINIO_ACCESS_KEY>
  - STORE_SECRET_KEY=<MINIO_SECRET_KEY>
  - STORE_BUCKET=notea
  - STORE_END_POINT=https://s3.mydomain.com
  - STORE_FORCE_PATH_STYLE=true
  - PASSWORD=<GUI_Password>

And using the Caddy file in the most common way to access a proxied service, my file contains:

note.mydomain.com{
  reverse_proxy 10.10.10.15:3000
  tls /path/to/cert.pem /path/to/privkey.pem
}

Do you think this could be an issue regarding the configuration of MINIO for the S3 Storage?

@QingWei-Li
Copy link
Collaborator

I'm not sure, I use nginx + docker, this is my configuration.

# minio.cinwell.com.conf
server  {
	listen	80;
	listen	443 ssl;
    server_name	minio.cinwell.com;
	ssl_certificate	/etc/nginx/ssl/*.cinwell.com.pem;
	ssl_certificate_key	/etc/nginx/ssl/*.cinwell.com.key;

    location / {
		proxy_set_header   Host    $host;
        proxy_pass	http://127.0.0.1:9001;
    }
}
# notea.cinwell.com.conf
server  {
	listen	80;
	listen	443 ssl;
    server_name	notea.cinwell.com;
	ssl_certificate	/etc/nginx/ssl/*.cinwell.com.pem;
	ssl_certificate_key	/etc/nginx/ssl/*.cinwell.com.key;

    location / {
		proxy_set_header   Host    $host;
        proxy_pass	http://127.0.0.1:3001;
    }
}

run docker

docker run -d \
  --name notea \
  -p 3001:3000 \
  -e STORE_ACCESS_KEY=[] \
  -e STORE_SECRET_KEY=[] \
  -e STORE_BUCKET=notea \
  -e STORE_END_POINT=https://minio.cinwell.com \
  -e STORE_FORCE_PATH_STYLE=true \
  -e IS_DEMO=true \
  cinwell/notea

@MattieX
Copy link
Author

MattieX commented Sep 6, 2021

I've tried disabling caddy and setting up a fresh Nginx Docker using your suggested recommendation. However, I'm still seeing the issue after browsing a couple of pages of my notes.

events {

}
http {
    server  {
        listen  80;
        listen  443 ssl;
        server_name     note.mydomain.com;
        ssl_certificate /etc/nginx/ssl/cert.pem;
        ssl_certificate_key     /etc/nginx/ssl/privkey.pem;

        location / {
            proxy_set_header   Host    $host;
            proxy_pass  http://192.168.10.13:3000;
        }
    }
    server  {
        listen  80;
        listen  443 ssl;
        server_name     s3.mydomain.com;
        ssl_certificate /etc/nginx/ssl/cert.pem;
        ssl_certificate_key     /etc/nginx/ssl/privkey.pem;

        location / {
            proxy_set_header   Host    $host;
            proxy_pass  http://192.168.10.14:9000;
        }
    }
    server  {
        listen  80;
        listen  443 ssl;
        server_name     s3-console.mydomain.com;
        ssl_certificate /etc/nginx/ssl/cert.pem;
        ssl_certificate_key     /etc/nginx/ssl/privkey.pem;

        location / {
            proxy_set_header   Host    $host;
            proxy_pass  http://192.168.10.14:9001;
        }
    }
}

Below is my Minio Docker configuration which I suppose is the last thing that could be causing the issue:

version: '3'
services:
    notea-s3:
      restart: always
      image: minio/minio
      container_name: notea-s3
      environment:
        MINIO_ACCESS_KEY: <MINIO_ACCESS_KEY>
        MINIO_SECRET_KEY: <MINIO_SECRET_KEY>
        MINIO_BROWSER_REDIRECT_URL: https://s3-console.mydomain.com
      volumes:
        - ./minio-data:/data
      entrypoint: sh
      expose:
        - 9000
        - 9001
      command: -c 'mkdir -p /data/notea && /usr/bin/minio server /data --console-address :9001 --address :9000'
      networks:
        default:
          ipv4_address: 192.168.10.14

@QingWei-Li
Copy link
Collaborator

QingWei-Li commented Sep 6, 2021

Can you reproduce the problem in https://notea.cinwell.com?

This is my test result, the cache storage did not increase when opening multiple tabs.

image

@MattieX
Copy link
Author

MattieX commented Sep 7, 2021

I can't seem to reproduce this issue on the website, however I seem to be unable to upload large images on your site, which is most of what my notes contain (Mainly Large Windows+Shift+S Snippets). - I'm not saying this is the cause, just a potential variable for figuring out what's causing my problem.

When uploading larger screen-captures to https://notea.cinwell.com/ I see the following:
image

I can only assume that the caching is likely from the images rather than text. On average there are anywhere between 10-30 images with multiple text chunks in-between on most of my note pages.

@QingWei-Li
Copy link
Collaborator

Previously, image resources were cached in cache storage by default, so I removed this configuration. Now you need to update to 0.3.6, then manually clear the cache, click clear site data button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants