<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Meera9</title>
    <description>The latest articles on DEV Community by Meera9 (@meera9).</description>
    <link>https://dev.to/meera9</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F751865%2F04035016-8553-4874-a02d-cc571e18f6e0.jpeg</url>
      <title>DEV Community: Meera9</title>
      <link>https://dev.to/meera9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meera9"/>
    <language>en</language>
    <item>
      <title>When My Laravel Queue Kept Stopping, the Queue Wasn't the Real Problem</title>
      <dc:creator>Meera9</dc:creator>
      <pubDate>Wed, 19 Aug 2026 13:56:59 +0000</pubDate>
      <link>https://dev.to/meera9/when-my-laravel-queue-kept-stopping-the-queue-wasnt-the-real-problem-561b</link>
      <guid>https://dev.to/meera9/when-my-laravel-queue-kept-stopping-the-queue-wasnt-the-real-problem-561b</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/bugsmash"&gt;DEV's Summer Bug Smash: Clear the Lineup&lt;/a&gt; powered by &lt;a href="https://sentry.io/" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;I had a Laravel application connected to &lt;strong&gt;Make.com&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Make.com was sending requests every 30 minutes, and Laravel was processing them through a queue.&lt;/p&gt;

&lt;p&gt;Everything worked — until the server restarted.&lt;/p&gt;

&lt;p&gt;My first approach was simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;nohup &lt;/span&gt;php artisan queue:work redis &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The worker ran fine, but after a server restart, it was gone.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔴 1. Why did the queue stop?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Server restart → &lt;code&gt;nohup&lt;/code&gt; worker dies → queue stops processing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjh1sr866w3rnacx8mhlh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjh1sr866w3rnacx8mhlh.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
&lt;code&gt;nohup&lt;/code&gt; keeps a process running in the background, but it doesn't give me a reliable process supervisor.&lt;/p&gt;

&lt;p&gt;So I needed the worker to automatically come back.&lt;/p&gt;


&lt;h2&gt;
  
  
  The First Fix: cPanel Cron + &lt;code&gt;flock&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I moved the queue worker startup to a cPanel Cron job.&lt;/p&gt;

&lt;p&gt;I also used &lt;code&gt;flock&lt;/code&gt; so that Cron wouldn't create multiple queue workers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/usr/bin/flock &lt;span class="nt"&gt;-n&lt;/span&gt; storage/framework/queue-worker.lock &lt;span class="se"&gt;\&lt;/span&gt;
php artisan queue:work redis &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--queue&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;default &lt;span class="nt"&gt;--sleep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3 &lt;span class="nt"&gt;--tries&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3 &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;120 &lt;span class="nt"&gt;--max-time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;120
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Server restarts → Cron starts the worker again&lt;/li&gt;
&lt;li&gt;Worker already running → &lt;code&gt;flock&lt;/code&gt; prevents another worker&lt;/li&gt;
&lt;li&gt;Worker processes jobs → no manual restart&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;That solved the queue-worker problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But then I found another problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Second Problem: Make.com Started Timing Out
&lt;/h2&gt;

&lt;p&gt;The queue was running.&lt;/p&gt;

&lt;p&gt;Redis was running.&lt;/p&gt;

&lt;p&gt;But Make.com started returning &lt;strong&gt;504 timeout errors&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I initially thought the queue was still the problem.&lt;/p&gt;

&lt;p&gt;It wasn't.&lt;/p&gt;

&lt;h3&gt;
  
  
  🟠 2. The Hidden Bottleneck
&lt;/h3&gt;

&lt;p&gt;My server had:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;65 GB RAM
20 CPU cores
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But PHP-FPM was configured with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="py"&gt;pm.max_children&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;5&lt;/span&gt;
&lt;span class="py"&gt;pm.max_requests&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;20&lt;/span&gt;
&lt;span class="py"&gt;pm.process_idle_timeout&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That meant only &lt;strong&gt;5 PHP requests could be handled concurrently&lt;/strong&gt; by that PHP-FPM pool.&lt;/p&gt;

&lt;p&gt;So the flow became:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make.com → Laravel → PHP-FPM → requests wait → timeout&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbzt6t3d5cd9kpm48f09b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbzt6t3d5cd9kpm48f09b.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
The important discovery was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The server had plenty of resources. PHP-FPM simply wasn't configured to use them effectively for the workload.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Final Fix
&lt;/h2&gt;

&lt;p&gt;I tuned PHP-FPM for the server's actual capacity and kept the queue worker managed by Cron + &lt;code&gt;flock&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🟢 3. The Final Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;cPanel Cron → &lt;code&gt;flock&lt;/code&gt; → Laravel Queue Worker → Redis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make.com → Laravel API → PHP-FPM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxhkki3mwrmj1pzuaqrl0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxhkki3mwrmj1pzuaqrl0.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
After the changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Queue worker automatically starts after restart&lt;/li&gt;
&lt;li&gt;✅ &lt;code&gt;flock&lt;/code&gt; prevents duplicate workers&lt;/li&gt;
&lt;li&gt;✅ PHP-FPM can handle more concurrent requests&lt;/li&gt;
&lt;li&gt;✅ Make.com requests stop timing out&lt;/li&gt;
&lt;li&gt;✅ No more manually restarting everything&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson wasn't about Laravel queues.&lt;/p&gt;

&lt;p&gt;It was about &lt;strong&gt;looking at the whole request path&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I was initially focused on:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Why does my queue keep stopping?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The better question was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Where exactly is my system becoming the bottleneck?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A queue problem isn't always a queue problem.&lt;/p&gt;

&lt;p&gt;Sometimes the real bottleneck is &lt;strong&gt;before the queue&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 Make.com
                    │
                    ▼
              Laravel API
                    │
                    ▼
                PHP-FPM
             (enough workers)
                    │
                    ▼
                  Redis
                    │
                    ▼
             Queue Worker
                    │
                    ▼
             Processed Jobs

        cPanel Cron + flock
                 │
                 └── keeps worker reliable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result was a more reliable Laravel + Redis + Make.com workflow without manually restarting everything after a server restart.&lt;/p&gt;




&lt;h2&gt;
  
  
  Best Use of Sentry
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Best Use of Google AI
&lt;/h2&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>How I Fixed Broken Portrait/Landscape Gallery Alignment (and Open-Sourced It)</title>
      <dc:creator>Meera9</dc:creator>
      <pubDate>Fri, 31 Jul 2026 06:57:48 +0000</pubDate>
      <link>https://dev.to/meera9/how-i-fixed-squarespaces-broken-portraitlandscape-gallery-alignment-and-open-sourced-it-3gfi</link>
      <guid>https://dev.to/meera9/how-i-fixed-squarespaces-broken-portraitlandscape-gallery-alignment-and-open-sourced-it-3gfi</guid>
      <description>&lt;h1&gt;
  
  
  Why I Built a Responsive Image Strip Gallery (and Published It for Every Framework)
&lt;/h1&gt;

&lt;p&gt;A few weeks ago I ran into a layout problem that sounds simple on paper: put portrait and landscape photos in the same row, aligned, without cropping them into ugly square boxes.&lt;/p&gt;

&lt;p&gt;It turned out that no gallery — not Squarespace's built-in options, not the popular npm galleries — actually solves this cleanly. So I built one myself: &lt;a href="https://www.npmjs.com/package/@meerathanki09/image-strip-gallery" rel="noopener noreferrer"&gt;image-strip-gallery&lt;/a&gt;, a fixed-column strip gallery that works in React, Vue, Angular, Svelte, plain JS, and as a copy-paste block for Squarespace and WordPress.&lt;/p&gt;

&lt;p&gt;Here's the problem, why the usual answers fall short, and how the package solves it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: masonry breaks on mixed orientations
&lt;/h2&gt;

&lt;p&gt;Squarespace's Section and Masonry gallery types are great for uniform grids, but they have a specific weakness — they don't keep portrait and landscape images aligned on the same row. Because masonry layouts stack images into columns of varying height, a tall portrait photo and a wide landscape photo end up with mismatched row baselines. You lose that clean, editorial "strip" look where six photos of different shapes sit level with each other.&lt;/p&gt;

&lt;p&gt;This isn't a hypothetical problem — I found a whole &lt;a href="https://forum.squarespace.com/topic/339316-strips-layout-gallery-mix-with-potrait-and-landscape-with-6-column-with-6-images-same-alignment/#comment-876114" rel="noopener noreferrer"&gt;Squarespace forum thread&lt;/a&gt; of people asking for exactly this and getting workarounds instead of a real fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  The usual workaround — and why it's a bad trade
&lt;/h2&gt;

&lt;p&gt;The common fix is to force every image into the same crop box: uniform width, uniform height, &lt;code&gt;object-fit: cover&lt;/code&gt;. Rows do line up — but you lose composition. A landscape shot gets cropped into a square, a portrait gets its subject clipped. For photography-led sites (portfolios, product shots, editorial layouts), that's not acceptable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the package actually does
&lt;/h2&gt;

&lt;p&gt;Instead of cropping, the gallery keeps each image's natural aspect ratio and solves alignment at the row level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A fixed number of images per row (default: 6 desktop, 2 mobile)&lt;/li&gt;
&lt;li&gt;Every row shares one height&lt;/li&gt;
&lt;li&gt;Each image's width is calculated from its own aspect ratio to fit that shared row height&lt;/li&gt;
&lt;li&gt;Portrait and landscape images sit side by side in the same row, fully aligned, uncropped&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is the "strip" look people were asking for on that forum thread — without the crop-box compromise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Built for how people actually ship sites today
&lt;/h2&gt;

&lt;p&gt;Because I do full-stack work across Laravel, Vue, and React projects — and because half my audience for this needed a no-code option — I shipped it two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A copy-paste HTML/CSS/JS version for Squarespace and WordPress — no npm, no build step, just paste into a Code Block and Custom CSS panel.&lt;/li&gt;
&lt;li&gt;An npm package with dedicated entry points for React/Next.js and Vue/Nuxt, plus a vanilla-JS core that works directly in Angular, Svelte, or plain HTML.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's lightweight (no jQuery dependency), SSR-safe for Next.js, includes an optional row-by-row fade-in animation, and every layout parameter — columns, gap, breakpoint, row height, animation timing — is configurable.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install @meerathanki09/image-strip-gallery&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ResponsiveImageStripGallery&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@meerathanki09/image-strip-gallery/react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ResponsiveImageStripGallery&lt;/span&gt;
  &lt;span class="na"&gt;images&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;images&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;columns&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;desktop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;mobile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;onImageClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why I'm sharing this
&lt;/h2&gt;

&lt;p&gt;I build a lot of client sites where photography matters — portfolios, product pages, event galleries — and I kept hitting this same wall. Rather than solving it once per project, I built it as a reusable, framework-agnostic package and published it publicly so anyone hitting the same forum thread I found doesn't have to choose between misaligned rows and cropped photos.&lt;/p&gt;

&lt;p&gt;If you're dealing with the same layout problem, the package is free and MIT-licensed:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://www.npmjs.com/package/@meerathanki09/image-strip-gallery" rel="noopener noreferrer"&gt;npmjs.com/package/@meerathanki09/image-strip-gallery&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback, issues, and PRs welcome.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
