一段时间后 apc_fetch 返回 false

发布于 2024-11-08 19:04:58 字数 577 浏览 0 评论 0原文

当我上传大文件(视频)时,我使用 apc_fetch 显示进度条。

apc_fetch 可以正常处理最大 180mb 的文件。但对于更大的文件,apc_fetch 在 190Mb 后返回 false。

基本上,如果我上传一个大文件(250mb),它会显示数据,直到“当前”小于“当前”。 190MB。当达到 190mb 时,它返回 false。没有数据。

我在 php.ini 中的 apc conf

extension=apc.so
apc.rfc1867 = on
apc.max_file_size = 1024M
upload_max_filesize = 1024M
post_max_size = 1025M
apc.shm_size = 512M
apc.rfc1867_freq= 0

有关它的更新: 仍在进行一些测试,我发现 apc_fetch 在 1 小时(60 分钟)后开始返回空。 我设置了这些,但仍然得到相同的结果。

apc.ttl = 0
apc.user_ttl = 0
apc.gc_ttl = 0

我认为问题出在时间上。

I'm using apc_fetch to show a progress bar when I'm uploading a big file (a video).

The apc_fetch works ok with file up to 180mb. But with bigger file, apc_fetch returns false after 190Mb.

Basically if I upload a big file (250mb) it shows data until 'current' is < 190mb. When it comes to 190mb it returns false. no data.

My apc conf in php.ini

extension=apc.so
apc.rfc1867 = on
apc.max_file_size = 1024M
upload_max_filesize = 1024M
post_max_size = 1025M
apc.shm_size = 512M
apc.rfc1867_freq= 0

An update about it:
Still making some tests and I found that the apc_fetch starts return empty afer 1 hour (60min).
I set those up, but still getting the same.

apc.ttl = 0
apc.user_ttl = 0
apc.gc_ttl = 0

I think that the problem is something with the time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

扎心 2024-11-15 19:04:58

您需要将apc.rfc1867_ttl设置为更大的值。它决定上传跟踪值在 apc 缓存中存在的时间。

默认值为 3600 秒,在此时间之后将不再跟踪上传。这就是为什么你看到它在一小时后没有返回任何内容。将其设置为比您预计上传所需的最长时间稍长的值。

You need to set apc.rfc1867_ttl to a larger value. It determines how long the upload tracking values live in the apc cache.

Default value is 3600 seconds, after this time the upload is no longer tracked. That's why you see it returning nothing after an hour. Set it to a value somewhat higher than the longest time you expect an upload to take.

冷夜 2024-11-15 19:04:58

看,我不知道这是否对您有帮助,但在升级到最新版本后不久,我遇到了 APC 问题,信息在存储后无法检索。

我绞尽脑汁试图找出它不起作用的原因。我重新启动服务器,它又工作了。从(一周多前)起就没有问题了。我怀疑可能已经触发了某种错误。

因此,如果您可以选择重新启动服务器,请考虑重新启动服务器,看看是否有帮助。

供参考。我没有处理大文件,所以这个问题可能无关。

Look, I don't know if this will help you at all, but I had an APC problem a little while back after upgrading to the newest version where the information just wouldn't be retrieved after it was stored.

I was tearing my hair out trying to work out why it wasn't working. I rebooted the server and it worked again. No problems since (a week and a bit ago). I suspect there could be some sort of bug that may have been triggered.

So consider rebooting the server if that is an option for you and see if that helps.

FYI. I wasn't dealing with large files so the issue may be unrelated.

梦过后 2024-11-15 19:04:58

确保 upload_max_filesize 和 post_max_size 大于您要上传的文件。据我所知, apc.max_file_size 不会影响它。

您还需要将 apc.rfc1867 = 0 更改为 10k 或 100k

更新频率应该是
为用户缓存条目创建
上传进度。这可以采取
占总文件百分比的形式
大小或字节大小(可选)
后缀为“k”、“m”或“g”
千字节、兆字节或千兆字节
分别(不区分大小写)。

Make sure that upload_max_filesize and post_max_size are larger than the file you are uploading. As far as I can tell, apc.max_file_size does not affect it.

Also you need to change apc.rfc1867 = 0 to 10k or 100k

The frequency that updates should be
made to the user cache entry for
upload progress. This can take the
form of a percentage of the total file
size or a size in bytes optionally
suffixed with "k", "m", or "g" for
kilobytes, megabytes, or gigabytes
respectively (case insensitive).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文