Ben bitirmek için uzun bir zaman alır ve bu nedeniyle yürütme zaman aşımı başarısız bir php komut dosyası var ya da ağ zaman aşımı (script çok uzun çalışır).
Esasen komut her tekrarında 2-3 işlemleri yapar döngüsü için yapar.
- kıvrılma yoluyla harici bir hizmeti talebinde
- xml ayrıştırma
- Bir veritabanına yanıtı eklemek
Her yineleme tamamlamak için 1-2 saniye sürer varsayalım.
I max_execution_timeout
set ve default_socket_timeout
0 için. Çalıştı aşımı sorunları gidermek için bu doğru olup olmadığını bana bildirin lütfen.
Unutulmaması gereken önemli nokta döngüsü için 70.000 kayıtları işlemek olabilir - bu temelde bir toplu SMS sistemi bulunuyor.
I flush()
veya ob_implicit_flush(true)
kullanarak tarayıcıya kısmi yanıtlar göndermesini ve output_buffering
0'a ayarlama denedim ama sadece nihai bir yanıt alma ve kısmi değilim olanlar.
(Aşağıda Original)
Hi, I would like to get assistance in one of my projects..ill explain the issues..what am doin is executing a long php script...where it takes a long time to finish running it..im experiencing script execution timeout ve network timeout issues....in my script..its a for loop which does 2-3 processes, on each iteration...one is requesting an external service(through curl)ve getting the response ve pasrsing the xml,inserting the response to the database...suppose that each iteration takes around 1-2 sec...for timeout issues i tried to set the "max_execution_timeout" ve "default_socket_timout" to 0..please suggest if there is any issue with it..eventhough this is temporary...ve main thing to note is for the loop..there may be more than 70k records....its basically a bulk sms system... This timeout mainly when the browser complaints the server..that im waiting for your response for many hours ve its time for me to sleep..so bye bye..this is what i learned so far...so i thought of queing the longs list of records into small chunks ve executing those ve sending the response to the browser thereby satisfying it...but the problem im been working around for few days is sending the partial response to the browser...using flush() or ob_implicit_flush(true);...ve setting output_buffering to 0...tried all possibilities...but im getting only the final response ve not the partial ones...ve atlasy my only intention was to keep the process active...what could be the possibility for this...any solutions for this...please help me out..