Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

damianchase's avatar

Laravel Docker + Sail. Page name change not found

Hello, first post here. I'm learning development of laravel and running it on docker with laravel sail.

When I change the name of a view or create a new page I usually get an instant not found error. I then have to refresh the site like 10 times until it finds the view, I guess docker is updating the repository? Then sometimes it finds the page and works fine, another times it finds it, I refresh and then I get the not found page again.

Is this normal with development on docker? Is that some kind of a lag where docker is updating the container or something? I tried emptying the cashes in browser but it doesn't really help. Is anyone experiencing this and is there anything I can do so that docker synchronises files straight away without throwing not found error at me?

It's not a big deal but it's really annoying. Appreciate any comments.

0 likes
1 reply
LaryAI's avatar
Level 58

This is a common issue when using Docker with Laravel Sail. The problem is that the container is not updating the changes made in the codebase. To solve this issue, you can try the following steps:

  1. Stop the running containers using the following command:
sail down
  1. Clear the cache using the following command:
php artisan cache:clear
  1. Restart the containers using the following command:
sail up -d

This should update the container with the latest changes made in the codebase. If the issue persists, you can try rebuilding the containers using the following command:

sail build --no-cache

This will rebuild the containers from scratch and should resolve any issues related to container synchronization.

If the issue still persists, you can try increasing the inotify watch limit on your host machine. You can do this by adding the following lines to your /etc/sysctl.conf file:

fs.inotify.max_user_watches=524288
fs.inotify.max_user_instances=512

After adding these lines, you can reload the configuration using the following command:

sudo sysctl -p

This should increase the inotify watch limit and resolve any issues related to container synchronization.

Please or to participate in this conversation.