Jump to content

flydev

Members
  • Posts

    1,327
  • Joined

  • Last visited

  • Days Won

    47

Posts posted by flydev

  1. 1 hour ago, bernhard said:

    both seem not to be part of wire shell.

    In wire shell no, but wirechief contain them and more, like pw:restore native:restore (mysqldump), duplicator:restore (working with packages), etc. My screenshot do not reflect the current version. Almost all commands contains subcommands depending on the arguments given. Too much to be listed here without spamming the thread.

    1 hour ago, bernhard said:

    Maybe that's something that's only useful if you are not using RockMigrations

    I dont use migrations everywhere and the cli tool allow, for example, to create templates, fields and assiging them in seconds, or installing pw and a specific profile from the terminal without writing any code, its time saver, like artisan. Keep in mind that the tools is born 8 years ago and abandoned since 4y.

    • Like 2
  2. Ok, thanks for the information, I thought that you was talking about Azure Security Group which reminded me of the session handler issue (I missed the AWS details on one of your previous message).

    I understand now better about the logout issue you encounter with file handler and you should avoid it. I am not experienced with RDS, and maybe @nbcommunication could have a better insight regarding his scaling setup presented recently on the forum.

    • Like 1
  3. HI, I am jumping in the thread. Just some questions. (By ASG did you mean Azure ?)

    - About the query SELECT GET_LOCK:

    • What's is the database server version, model (MySQL or MariaDb) and the database server max_connection settings value ?

    - Using file system based sessions, ask the team details about:

    • Value and permissions set of the php.session.save_path and the number of files in the target.
    • Value of php.session.save_handler ?

     

    Edit: FI, I just checked on three setups using file system session with the bug-issue-1760, there is 4416, 7428 and 5651 session-files and growing without slowing down the system at this moment of writing. 

    Edit2: @Nishant There is also an article that could be interesting and might help of tweaking the session database handling:

    https://processwire.com/blog/posts/pw-3.0.175/#read-only-and-db-driven-sessions

    • Like 1
  4. To add informations on Steve suggestions, and avoid more troubleshooting than necessary, as you are running out of space, the second issue "SQLSTATE[08004] [1040] Too many connections" is certainly due to lack of disk space.

    The explanation is:  lack of disk space make MySQL waiting before INSERT, UPDATE, etc, can complete and then increase the number of pending connections until the limit of `max_connection` is reached.

    For checking disk usage you might want to use a better tool like duf (muesli/duf/releases) to get a nice insight of disk usage (you will might not be able to install it due to the issue, just remove some log files to get a bit space, you require less than 900kb).

    duf.png

    • Like 3
  5. Personally, I am just ripping on React. About my own experience with all this JS mess, I had the same sentiment you described about the frustration, I was totally in, until webpack "disappeared". I then got interest on bundlers, studied the core of rollup and then vite to finally turning the pile of JS bricks living my brain into a solid wall. Writing chromium bindings for Pascal language helped a lot, as the goal was to build an alternative to Electron.

    Yes, Angular... I wanted to talk about the NestJS infra inspired by Angular. Anyway, another stack and breaking changes..

    42 minutes ago, FireWire said:

    Yes! I'm using InertiaJS with Laravel and Vue.

    Missed this details, I thought you was using InertiaJS with ProcessWire 👍

    • Like 2
  6. You can also generate desired image variations when you upload an image in the field:

    /**
     * // in ready.php
     * Image variations
     * Generate image variations on upload
     * Pageimage api ref: https://processwire.com/api/ref/pageimage/
     */
    $this->wire()->addHookAfter('InputfieldImage::fileAdded', function ($event) {
    	$inputfield = $event->object;
    	$image = $event->argumentsByName("pagefile");
    
    	// `image` field on `document` template
    	if ($inputfield->hasField == 'image'
    		&& $inputfield->hasPage
    		&& $inputfield->hasPage->template->name == 'document') {
    
          // some custom options
          $defaultOptions = array(
            'upscaling' => false,
            'cropping'  => false,
            'quality'   => 90,
          );
    
    	  // generate image variations
    	  // See wire/config.php for $config->sizeName: https://github.com/processwire/processwire/blob/master/wire/config.php#L726-L789
    	  $image->size('landscape'); // 16/9 defined size `landscape` from $config->sizeName
    	  $image->size(200, 250);    // 4/3	thumbnails	
    	}
    });

     

    For debugging => https://processwire.com/modules/tracy-debugger/ 

    • Like 3
  7. 1 hour ago, FireWire said:

    "But", the full stack JS dev will say, "you can use the same language everywhere so there's consistency."

    When this answer come, you already know the dev is confused. I will not even speak about React as it's a piece of software I cannot really understand but only that's the big elephant called Wordpress in the JS world, I feel like the folks was trying to make things complex for an obscure reason, maybe they worked for the DoD in the '70 when they realised they was writing code in something like 500 differents languages. "We need consistency and simple complex things". Look at this sample (React vs Svelte) and try to understand 🤯:

    svelte:
    ---
    <script>
      let a = 1;
      let b = 2;
    </script>
    
    <input type="number" bind:value={a}>
    <input type="number" bind:value={b}>
    <p>{a} + {b} = {a + b}</p>
    react:
    ---
    const [a, setA] = useState(1);
      const [b, setB] = useState(2);
    
      function handleChange (event, setValue) {
        const { value } = event.target;
        setValue(value);
      };
    
      return (
        <div>
          <input type="number" value={a} onChange={(e) => handleChange(e, setA)} />
          <input type="number" value={b} onChange={(e) => handleChange(e, setB)} />
          <p>{a} + {b} = { parseInt(a) + parseInt(b) } </p>
        </div>
      );
    }

    💁‍♂️    (taken from logrocket.com)

     

    Not going into SSR things, but I must admit that since some years, I am mostly writing desktop software UI in JS where all complex things are not required, keeping a good architecture and making the user experience really far way above native UI, and even more when mixing real-time with 3D libs.

    About the backend side, it's worth mentioning Angular and an awesome framework inspired from it, NestJS. NodeJS is really fast.

    I Read in your previous thread you are using InertiaJS, what about rendering then ? Maybe you do not need it / care of it ?

     

    1 hour ago, FireWire said:

    React is excited about saving 240k while the entire jQuery library is 85.4k (uncompressed)

    I couldn't resist to add a note for Svelte's size where source top at less than 4kb and less than 2kb compressed without brotli.

     

    1 hour ago, FireWire said:

    "Note: this thing that you've built several apps with and know well is going away. We're destroying it because someone on Github said we need to move to stateless functions. Soon there will be pain, and you will cry." is very limited. I made that one up, but you get the idea.

    It happened 🤭

    PS:  The screenshots seem to be not viewables.

    • Like 1
    • Haha 1
  8. I don't really get the point of the video, and associated with you question, it make me confusing, can you elaborate what you had in mind by asking ? 😄 (keep in mind I am not following the current bashing) I think I am in not the targeted audience. Like him I always ever been confused by people trying to reinvent the wheel, or trying to do in the frontend what the backend already do/ship, or even without it. A fact is (and I hope not a global one), among others, schools recruiters need to focus on the teachers they are recruiting to give good habits and knowledges to students. I have a real example as since one month as I have a trainee at home (first year of a Bachelor Digital School in France), she asked me to help make things about coding more clear in his head. I could see what she learnt in his first year making me not surprised that this kind of video pops. Experienced devs have no excuses anyway.

    edit: just a (maybe useless ) comment, this is what I like (even if I am not using it) about HTMX philosophy.

    • Like 4
  9. 23 hours ago, zx80 said:

    but once the stuff goes live, anybody knowing the Url can try to break things

    • Like 1
  10. Yes, that's what is good with this tool, you are not required to be stick with a fixed solution. You can implement what's you have in mind and how you want to implement it. Really glad to see where you already are on using ProcessWire, it seem you got the freedom philosophy it bring to you 👏👏

    The module FrontendForms from @Juergen look a good candidate to me as he maintain it and did a fantastic job on it.

    Also, I saw @AndZyk linked LoginRegister Module in other thread which could fit good here, for free. I remember we discussed years ago on some customization tricks that could give you ideas. Below you can find a thread about it, but keep it for later as I see you are short on your deadline 🫡

    The original blogpost for the Pro version, just in case: https://processwire.com/blog/posts/login-register-pro/

    You will find also a lot of tips (generally using code from quite deep in the core) from @Robin S in the forum, there are so much of them that you will need google to find them 😂

    PS: I am going to add a comment on your other threads about the spam protection.

    • Like 2
  11. I will read my answer again tomorow on the morning, but just throwing an idea about the form. 
    Instead of trying hard to fight bots and potential hackers, you could benefit from existing protections of the login process by using a custom login form, by storing the bookingID in a field of the template user, you could differentiate each user by generating a username, for example "user_`$bookingID`", the username is not important here, and the password (which could be generated from the bookingID and a salt), not important either.
    However, bots or hackers will have trouble getting through. You can also add a captcha like Mosparo to respect data collection.

     

    • Thanks 1
  12. Hello,

    11 hours ago, Erik said:

    I have no idea where to start troubleshooting this error.

     

    Start by checking the ProcessWire logs and then the logs of the webserver/PHP process. You might need to adjust ProcessWire's .htaccess file.

    Also, more info are needed for us to give you better support. Dev or prod environment, hosting type, version, etc.

    • Like 1
  13. It's seem that "OVH/Hosteur/DigitalOcean" VPS are good candidates - I am not affiliated with them, I manage some dedicated bare metal servers and VPS on OVH - you could start with a ~$4 VPS, and upgrade it if you need more vCore and/or RAM without reinstalling the system. By using Ubuntu 23 (v22 support end on July 2023) you can get started in ten minutes if you are used to deploy LAMP/LEMP.

    On the backend side, you will get a response time of around 60ms, use Cloudflare on front, and your $4 VPS perfs will be really nices.

    You can check for example the guide on DigitalOcean to choose what suit your needs: concepts/choosing-a-plan

     

    • Like 1
  14. 8 hours ago, gebeer said:

    The challenge here lies in optimizing the text splitter and creating the embeddings in a way targeting the LLM you are going to use for the chat.  Ultimate goal is to have this running locally without proprietary LLMs like chatGP

    When you will test it, do not hesitate to share some results, on my side, it's quite slow but I run it with an un-optimized computer unit. I realized this morning while talking about it with the boss that I was running it with only 1/3 of the RAM - so going to launch some more tests tomorrow.

  15. 1 hour ago, gebeer said:

    But that would be quite a lot of info to ingest

    True! 😅 I can't quantify right now how many GPU-hours it will require... we will know it when we will have an idea of the dataset size.

    1 hour ago, gebeer said:

    for large data sets like these, would you use pinecone or weaviate or other solutions?

    I would go with Weaviate because it's open-source and self-manageable if needed; it's worth noting that both of them support hybrid search (sparse and dense vector concepts), . No idea which one is the most performant, but this details on our level seem not important.

    As a note, in the experiments I talked about in my previous post, I am using Qdrant as it have support for storing documents, and the most important part for me, again, you can self-manage it.

    • Like 1
×
×
  • Create New...