Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate failing with spatie/fork errors #187

Open
efc opened this issue Dec 27, 2024 · 1 comment
Open

Generate failing with spatie/fork errors #187

efc opened this issue Dec 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@efc
Copy link

efc commented Dec 27, 2024

Our static site generation has started to fail with errors in spatie/fork. We see the errors when either version 1.1.3 or 1.2.3 of spatie/fork are installed, but we get no error at all when we remove spatie/fork and generate the site without any workers.

Any thoughts on what might cause this sort of error?

Here is the output of an attempt to generate the site with --workers=4 using v.1.1.3 of spatie/fork...

[✔] Gathered content to be generated
Generating /web/tensegrities/2013/11/11/tweets-of-the-week-71

   ErrorException 

  unserialize(): Error at offset 8152 of 8178 bytes

  at vendor/spatie/fork/src/Task.php:114
    110▕ 
    111▕         $output = $this->output;
    112▕ 
    113▕         if (str_starts_with($output, self::SERIALIZATION_TOKEN)) {
  ➜ 114▕             $output = unserialize(
    115▕                 substr($output, strlen(self::SERIALIZATION_TOKEN))
    116▕             );
    117▕         }
    118▕ 

      +21 vendor frames 

  22  please:18
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
Generating /web/tensegrities/2007/08/24/adult-ed
Generating /web/tensegrities/2008/01/05/poster-images-for-theological-terms
efc@Turkey mary % 
   ErrorException 

  socket_write(): unable to write to socket [32]: Broken pipe

  at vendor/spatie/fork/src/Connection.php:79
     75▕             }
     76▕ 
     77▕             $length = strlen($payload);
     78▕ 
  ➜  79▕             $amountOfBytesSent = socket_write($this->socket, $payload, $length);
     80▕ 
     81▕             if ($amountOfBytesSent === false || $amountOfBytesSent === $length) {
     82▕                 break;
     83▕             }

      +24 vendor frames 

  25  please:18
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
Generating /web/tensegrities/2004/07/20/will-we-recognize-fascism

   ErrorException 

  socket_write(): unable to write to socket [32]: Broken pipe

  at vendor/spatie/fork/src/Connection.php:79
     75▕             }
     76▕ 
     77▕             $length = strlen($payload);
     78▕ 
  ➜  79▕             $amountOfBytesSent = socket_write($this->socket, $payload, $length);
     80▕ 
     81▕             if ($amountOfBytesSent === false || $amountOfBytesSent === $length) {
     82▕                 break;
     83▕             }

      +24 vendor frames 

  25  please:18
      Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))
@duncanmcclean duncanmcclean added the bug Something isn't working label Dec 28, 2024
@efc
Copy link
Author

efc commented Dec 29, 2024

I was using both Feedamic and Bonus Routes on the site that was experiencing these errors. I have no idea if it is related, but after removing these two addons, I now find that I can generate the static site with spatie/fork again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants