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

Fatal error: Allowed memory size in git-deploy on line 157 #42

Open
edukarma opened this issue Aug 15, 2014 · 5 comments
Open

Fatal error: Allowed memory size in git-deploy on line 157 #42

edukarma opened this issue Aug 15, 2014 · 5 comments

Comments

@edukarma
Copy link

Got this error:

[2014-08-15 21:15:00 +0200] Deploying to server for the first time...
sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:git show d6f85a2aa7b46049ab9dd6161abb098b5b59c6fd:uploads/score/score-35-1370971179-4356572206042(1).pdf 2>&1 > "/private/var/folders/xf/vhr6fx9s2z78q3_7yqbbmzqc0000gq/T/git-deploy-JRNstR"'
sh: -c: line 0: syntax error near unexpected token (' sh: -c: line 0:git show d6f85a2aa7b46049ab9dd6161abb098b5b59c6fd:uploads/score/score-35-1370971305-4356572206042(1).pdf 2>&1 > "/private/var/folders/xf/vhr6fx9s2z78q3_7yqbbmzqc0000gq/T/git-deploy-fsNjGp"'

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 3234379 bytes) in /Applications/MAMP/htdocs/myproject/git-deploy on line 157

@pocketarc
Copy link
Owner

Interesting, about the errors; maybe that's what's causing issues.

Can I just check, is score-35-1370971179-4356572206042(1).pdf the name of the file that's causing you problems? Or am I missing something (for example a space character or something)?

@edukarma
Copy link
Author

OK. So there was two issues:

  1. The memory leak. I fixed this by changing memory to 9999m (in top of the git-deploy). I was uploading a whole new project with thousands of files.
  2. Prohibited files. By some unkown reason, we had some files which the git-deploy did not like. Luckily, these files were old and could simply be deleted. Files containing Æ, Ø or Å (which is normal characters in Danish) the git-deploy would fail.

Everything works beautifully now - thanks!

@nolfranklin
Copy link

I seem to be having the same issue as @edukarma. I'm trying to deploy a relatively large site and on deploy get a few errors:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 735281 bytes)

I modified the git-deploy file and upped the memory_limit but got another error:

Uncaught exception 'PharException' with message 'phar
SHA1 signature could not be verified: broken signature' in /git-deploy:5

@pocketarc
Copy link
Owner

The problem is that it loads everything into memory before deploying. By default the memory limit is 256MB so if you're trying to load more than that it's going to fail. I've just bumped up the memory limit, and it should solve the problem with memory usage on the first deploy.

I'm now looking into a way to reduce the peak memory usage by removing the bulk-loading of all files, to avoid this issue entirely.

@nolfranklin
Copy link

You rock! Thanks @BrunoDEBARROS, this worked perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants