playSMS Forum

HTTP Error 500 on Reports Page

I am getting the 500 Error only on this page in Report

https://websms.CCCCCCCC.com/index.php?app=main&inc=feature_report&route=admin

Anything I should look for?

Regards,
Walter

check your webserver’s error log file, usually theres helpful info why it happenned

anton

I solved the issue by increasing memory_limit in /etc/php/7.4/apache2/php.ini
Depends on yr php you may need find the correct version in your system

Hope this helps

Hi,

Can you share how many rows you have in your tblSMSOutgoing and tblBilling ?
And also, do you use playSMS 1.4.3 ?

anton

tblSMSOutgoing : 1701528
tblBilling: 1701509

yes using the update 1.4.3

Now i encounter slow sending via smpp when start bulk sms 1200 it will take about 30 minutes to send.

This can’t be helped, in 1.4.3 and before both table used to calculate billing, which probably shouldn’t.

In beta version, only tblBilling used, and during sending SMS the information needed to calculate billing are written to tblBilling, so no need to include tblSMSOutgoing in a JOIN sql for example.

reference:

Which gateway do you use ? Kannel ?
By 30 minutes, how do you know that ?

anton

Yes using Kannel
Based on Time stamped on SMS Message itself when sending and the time SMS is received.
Did a verification check the other day. Its seems not the SMPP gateway issue since the actual Sent SMS tally with the time of the SMS received

smstest

If possible set mysql slow log, and report here which sql so slow

Ill do the same with a test db later tonight

Anton

Try add index in tblBilling:

ALTER TABLE `playsms_tblBilling` ADD INDEX `smslog_id` (`smslog_id`);

That might help:

My sample database contains about 58 thousands entries only. Without both table being indexed the query will have to go through all rows, but with proper index it reduced to 1/10 rows only.

You can try in your database this query (with uid is uid of one of your user of course):

EXPLAIN SELECT SUM(A.charge) AS billing FROM playsms_tblBilling A INNER JOIN playsms_tblSMSOutgoing B ON A.smslog_id=B.smslog_id AND A.status='1' AND B.uid='3';

Then add index, see how fast, or how small the row after.

anton

Thanks Anton. It improves abit. Added the suggested index, my results got 50% of the original query. May need to improve further. I have purged and added indexes as suggested in the forum by Edilson_Spessoto

Before add index. >> 381644 rows

After add index >> 186047 rows
Size goes about 50% than before add index suggested by Anton

This my current data from Jan 2021 todate.

If any further improvements tip will be much appreciated. Thanks

Don’t think anymore index will help, that’s quiet alot of data. Next optimization I suppose must be on the code level. But if anyone have solution, please share.

I currently don’t have enough data to make my system slow, my sample data is about 100k now, seems quiet quick to send 4k sms, no more than a minute (to send to Kannel all 4k sms, but with DLRs updates around 6 minutes, that includes waiting for DLRs from Kannel). I will add more data soon, at least until 1 million rows.

anton