CodeIgniter4 icon indicating copy to clipboard operation
CodeIgniter4 copied to clipboard

Bug: [DebugBar] `HotReload` causes 500 error

Open neznaika0 opened this issue 2 years ago • 3 comments

PHP Version

8.2

CodeIgniter4 Version

4.4.2

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

cli-server (PHP built-in webserver)

Database

MariaDB 10

What happened?

See forum thread-88719 I observed this behavior in myself, so I decided to open a issue. Feature breaks (500 error) or refreshes pages for a long time. Browser: Yandex (Chromium)

Unfortunately, I can't say more yet - only on a smartphone.

Steps to Reproduce

Run server and enable HotReload in dev toolbar.

Expected Output

Normal page refresh with minimal speed delay

Anything else?

No response

neznaika0 avatar Oct 25 '23 19:10 neznaika0

@neznaika0 Please check #8112 when you have time.

michalsn avatar Oct 28 '23 11:10 michalsn

We need more detailed "Steps to Reproduce".

kenjis avatar Oct 30 '23 21:10 kenjis

I tested it again. I think this is because of the built-in server - it is not configured to work multithreaded. The hot-reload event completely takes up the process, it freezes (waiting for the page to refresh).

On the server with apache2 It works perfectly.

neznaika0 avatar Jun 10 '24 06:06 neznaika0

If you use macOS or Linux, you can run it with multi-threads.

PHP_CLI_SERVER_WORKERS=4 php spark serve

kenjis avatar Jul 08 '24 23:07 kenjis

I configure vhost. CLI server for fast tests.

neznaika0 avatar Jul 09 '24 04:07 neznaika0