Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

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

salmiak's Achievements

Jr. Member

Jr. Member (3/6)



  1. Because I'm using the LoginRegisterPro module, users use their email to log in. So I'm wondering, for authentication, should i make an endpoint that returns the username for a given email address and use that to authenticate or is there a better way to solve this that doesn't use an extra request.
  2. I'm working making a module integrating monolog into processwire now. When hooking into WireLog I can intercept most logs. Except for fatal errors. These dont go through WireLog but are sent from WireShutdown to FileLog directly. I don't really know if there is a way to intercept these without hacking the core. Does anyone have an idea?
  3. @BitPoet I'm quite interested in this as we have lots of problems with performance for file logs. Did you make any progress since you posted this?
  4. What are the differences between using the including and bootstrapping and multi-instance approach for using ProcessWire in an external script? Obviously multi-instance would let you use more than one installation and in my environment multi-instance seems to perform (much) better under load. Why would I choose one over the other?
  5. Added namespace but sadly it doesn't change the result. [EDIT] I solved it by restoring a backup. Still kinda strange...
  6. 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.
  7. 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?
  8. 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?
  9. 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?
  10. Thanks! I can work around it for now. Issue opened: https://github.com/processwire/processwire-issues/issues/1247
  11. 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
  12. Ok it's a different error now in tracy logs: PHP Warning: file_put_contents(): Exclusive locks are not supported for this stream
  13. @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
  14. Setting a custom placeholder (or a default value) would be useful for my site too.
  • Create New...