You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A missing static file can cause the server to bloat and crash.
The default request handler app.get('*') is for a Vue request
The static file request handler, eg app.use('/dist') allows fallthrough
Therefore, when a static (image or JavaScript) file is not found, the request falls through to the default handler
The default handler attempts to render the page, which results in an error
The error handler is called and it redirects to the "page-not-found" route
The Page Not Found request is unnecessarily rendered and returned instead of a standard 404 status
This situation, a simple missing file, causes an increase in memory usage on the server and is worth fixing. However, a more serious condition can arise.
If a theme file is missing, such as a header logo, the situation described above occurs
When the Page Not Found is being rendered, the missing file is requested again
The same steps are repeated and there's another redirect to page-not-found
The server attempts to render the Page Not Found request again
This is an infinite loop. Each image request results in a further page-not-found redirect and another request for the missing image and so on.
As this happens, each request uses more memory and very soon the limit is reached. In production mode, PM2 should then kill the server and restart it, but the problem remains.
Expected behavior
A 404 file-not-found status is returned
Steps to reproduce the issue
Delete /assets/logo.svg from a default installation
Open any page in a browser
Observe memory usage on the server
Repository
Can you handle fixing this bug by yourself?
YES
NO
Simple fix. Preparing a Pull Request
Which Release Cycle state this refers to? Info for developer.
Pick one option.
This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.
Environment details
Browser: Chrome
OS: Mac
Node: 8.11.4
Code Version: 1.8.4, master, develop
Additional information
The text was updated successfully, but these errors were encountered:
Current behavior
A missing static file can cause the server to bloat and crash.
app.get('*')
is for a Vue requestapp.use('/dist')
allows fallthroughThis situation, a simple missing file, causes an increase in memory usage on the server and is worth fixing. However, a more serious condition can arise.
As this happens, each request uses more memory and very soon the limit is reached. In production mode, PM2 should then kill the server and restart it, but the problem remains.
Expected behavior
A 404 file-not-found status is returned
Steps to reproduce the issue
Repository
Can you handle fixing this bug by yourself?
Simple fix. Preparing a Pull Request
Which Release Cycle state this refers to? Info for developer.
Pick one option.
develop
branch and create Pull Request2. Feature / Improvement
back todevelop
.release
branch and create Pull Request3. Stabilisation fix
back torelease
.hotfix
ormaster
branch and create Pull Request4. Hotfix
back tohotfix
.Environment details
Additional information
The text was updated successfully, but these errors were encountered: