Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

12 Good

About salmiak

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Added namespace but sadly it doesn't change the result. [EDIT] I solved it by restoring a backup. Still kinda strange...
  2. All of a sudden Bootstrapping processwire doesn't work anymore. This morning it was working fine but now it isn't. I made the following file to test. <?php // Bootstrap ProcessWire include("../index.php"); echo 'success'; When I open this in the browser (debug mode on) I get a 'connection reset' timeout. When I start it from the command line I get a bunch of notices and warnings regarding the session that don't show if I disable sessions. (I read in another topic these are normal) After that the process just hangs indefinitely somewhere in the boot process. The website seems to function normally otherwise. There are no related errors in the logs. Where to go from here.
  3. Ok I sort of found out what was the reason is and that that was also causing some other problem I've been trying to figure out. My site is hosted on an NFS volume and because of some delays between the server and the nfs volume things go wrong under load. If the load is somewhat bigger it causes my website to stop responding at all. Leaving the database full of sleeping processes. My fix for now is immidiatly returning from afterPageView(HookEvent $e) in the LazyCron.module. This obviously solves both problems. But I like to solve it in a better way: Does the core need LazyCron? And is there some way I can make LazyCron use the database instead of the filesystem?
  4. I tried setting it to: $this->set('lockSeconds', 1); // max number of seconds to wait to obtain DB row lock $this->set('retrySeconds', 1); // seconds after which to retry on a lock fail And after a load test with https://github.com/rakyll/hey It seems to improve things from handeling max 10 requests per second (continiously) to about 35. A few questions:. What would be the downside of this? Why is it this high in the first place?
  5. I have a site with user login using the LoginRegisterPro module. Where I host an embedded youtube livestream (weekly). On that page I track the users activity using AJAX storing the time they spend on the page and what they vote for in a live poll(also using AJAX). Often it works without issue (mostly around 150 users) But when we go over about 200-300 concurrent users things started to slow down and I got hundereds of these errors: Error: Exception: Unable to obtain lock for session (retry in 30s) (in /path/to/wire/modules/Session/SessionHandlerDB/SessionHandlerDB.module line 96) After a while the site stopped responding. What can I do to solve this?
  6. Thanks! I can work around it for now. Issue opened: https://github.com/processwire/processwire-issues/issues/1247
  7. I'm trying to get the last url segment with the new API and when I try to access the last segment I get the one second to last. For example in the url: https://domain.com/page/seg1/seg2/seg3/seg4/ $input->urlSegment(-1) and $input->urlSegmentLast return "seg3" $input->urlSegment(-2) returns "seg2" $input->urlSegment(-3) returns "seg1" as expected: $input->urlSegment(1) returns "seg1" $input->urlSegment(4) returns "seg4" I tried the following $input->urlSegment(0) returns "seg1" $input->urlSegment(-0) returns "seg1" What's going wrong here? I'm using ProcessWire: 3.0.165
  8. Ok it's a different error now in tracy logs: PHP Warning: file_put_contents(): Exclusive locks are not supported for this stream
  9. @ryan In this version if you try to access an unpublished page that is selected in a page reference field like this: $page->page_ref_field; It returns false. In 3.0.153 it returns the (unpublished) page object. I don't know if this is expected behavior but it will break some things in my site. EDIT: Found the issue: This behaviour was changed in 3.0.155 -> https://github.com/processwire/processwire-issues/issues/1159
  10. Setting a custom placeholder (or a default value) would be useful for my site too.
  11. This could be useful: https://github.com/spatie/calendar-links
  12. I often get this error: Unable to write lock file: /site/assets/cache/LazyCronLock.cache In tracy logs: PHP Warning: file_put_contents(/path/to/site/assets/cache/LazyCron.cache): failed to open stream: Access denied in /path/to/wire/modules/LazyCron.module:209 I tried to give the site/assets/cache folder 777 permissions but this doesn't solve it.
  13. Ok so I changed it to something like: $rf = $p->repeater_field->get("fieldA=$user"); $rf->of(false); if($rf) { $p->a_page_reference_field->add($user); $p->of(false); $p->save(); } And now there is no exception. I seems strange to me that its neccesary to set of(false) on the repeater item/page when I'm not changing it.
  14. What I'm trying to do in my template is the following. Get a specific page ($p) then(simplified): if($p->repeater_field->has("fieldA=$user")) { $p->a_page_reference_field->add($user); $p->of(false); $p->save(); } The code seems to work but it gives an exception: Can’t save page 9885: path for repeater page: Call $page->of(false); before getting/setting values that will be modified and saved. [fieldA] (in /wire/core/PagesEditor.php line 438) Can someone help me?
  • Create New...