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
Archive/Tar.php issues on the alpine demos in Administration->Backup #128
Comments
Hmm perhaps it's a permissions issue. I'll check shortly to see if that's the case. |
Odd. I wasn't able to replicate with :latest (successfully generated a tarfile). Is there anything else I should be doing to replicate? |
On linux, chance of catching the Archive/Tar fail is dependent on how error levels are set. Moreover, bumping the max memory size in php.ini will allow backup to work until a tar of greater size is downloaded i.e with memory_limit = 512M and tar is 550M will fail with out of memory. This most likely is due to output buffering being turn on. So I'm thinking a revisit to backup.php is in order namely to ensure output buffer is flushed and turned off before header is sent or convert to a stream. |
Something interesting to note on the demo farm. The Ubuntu dockers have memory limit of 128 and do fine on the backup while Alpine dockers needed to be bumped to 256. I am thinking this is probably because the Ubuntu is using Archive/Tar, while Alpine is using the alternative backup method (when Archive/Tar does not exist). |
Also I believe swap memory may be turned off for Alpine |
(sorry, didn't get notifications for this issue) I could definitely be wrong, but this sounds like a bug in openemr/openemr. I feel like memory use increasing as db size increases ends up being unsustainable, and it would be better to stream to the file in chunks rather than (presumably) all at once. Again, definitely could be wrong, but maybe this is an issue to move over there? |
See my comment above. If y'all want to move issue to OpenEMR i'll try to fix but just can't now. |
Could https://github.com/ifsnop/mysqldump-php be relevant to this issue? Odds are it's making more sensible decisions about memory management than our tool is. |
Agreed but one issue seems to not be creating the tar but instead app will load entire tar into memory for download thus we need to stream the tar or turn off the output buffer before sending the header then PHP should manage the memory. For some reason if output buffering is on, PHP wants to load entire tar into memory. |
hi @sjpadgett , |
I'll test it today.
…On Fri, May 18, 2018 at 2:55 AM, Brady Miller ***@***.***> wrote:
hi @sjpadgett <https://github.com/sjpadgett> ,
Is setting output buffering to off a feasible fix for this? If so, would
be awesome, since starting to get reports of this bug on forum.
-brady
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#128 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABxhkXtERV-1owrEZc99qJ1W1EF0zn-Hks5tznBGgaJpZM4TkiqB>
.
--
Jerry Padgett
Padgett's Consulting
Brandon, Florida 33511
sjpadgett@gmail.com <sjpadgett@gmailo.com>
|
openemr/openemr#1643 |
thanks @sjpadgett ! |
This does not break anything since OpenEMR has another backup mechanism when Archive/Tar.php does not exist.
have tried the following without success in the dockerbuild:
brought in php7-pear then followed by
pear install Archive_Tar
(it looks like it installs correctly, but the PHP warning still shows up)
low priority since backup still works and I plan to work on this.
The text was updated successfully, but these errors were encountered: