SolidBench / SolidBench.js

A benchmark for Solid to simulate vaults with social network data.
MIT License
10 stars 11 forks source link

Disable resource locker in Solid server config #7

Closed surilindur closed 1 year ago

surilindur commented 1 year ago

When serving the generated dataset, the Community Solid Server sometimes outputs errors like:

2023-07-10T08:54:40.266Z [WrappedExpiringReadWriteLocker] {Primary} error: Lock expired after 6000ms on http://localhost:3000/pods/00000002199023256816/comments/India
2023-07-10T08:54:40.268Z [StreamUtil] {W-???} warn: Piped stream errored with Lock expired after 6000ms on http://localhost:3000/pods/00000002199023256816/comments/India
2023-07-10T08:54:40.269Z [BasicResponseWriter] {Primary} error: Aborting streaming response because of server error; headers already sent.
2023-07-10T08:54:40.269Z [BasicResponseWriter] {Primary} error: Response error: Lock expired after 6000ms on http://localhost:3000/pods/00000002199023256816/comments/India

These seem to be related to locks expiring, but when data is being served within SolidBench, it is intended for read-only purposes and should not need locks. The configuration change in this pull request makes the SolidBench server configuration use a locker for the server that does not actually do anything, removing those lock errors. Maybe this is not the best solution, but it seems to work.

rubensworks commented 1 year ago

@RubenEschauzier, can you confirm if this change solves the problem on your end as well? If so, I'll merge this PR and make a new release.

Pinging @joachimvh here as well to check if this is the proper way forward for the read-only usage of a CSS instance.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5506108441


Totals Coverage Status
Change from base Build 4594941926: 0.0%
Covered Lines: 116
Relevant Lines: 116

💛 - Coveralls
joachimvh commented 1 year ago

This is the correct way to disable the locking mechanism, which should indeed be fine if you're only reading the data from the server.

If you're using the server in a multithreaded setup, the timeouts are probably by a bug that was fixed in v6: https://github.com/CommunitySolidServer/CommunitySolidServer/issues/1610. But if you're only reading data just disabling the locker is probably the better solution anyway as it will improve performance.

RubenEschauzier commented 1 year ago

This indeed solves the problems on my end too.

rubensworks commented 1 year ago

Thanks for checking! Preparing a new release now.