Bug with too many ingroups in user profile

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Bug with too many ingroups in user profile

Postby dspaan » Tue Nov 11, 2014 4:36 am

http://www.vicidial.org/VICIDIALmantis/view.php?id=795

We have been running a server that is being used for an answering service for small entrepeneurs. That means there are hundreds to thousands of ingroups because when a call comes in each entrepeneur uses his onwn ingroup so the operator knows how to answer the phone based on the script that shows up with the company name of the entrepeneur.

However, when a vicidial user has hundreds of ingroups in his profile and you make a change in the userprofile it times out while submitting and doesn't save the bottom half of the fields on the modify user page. It submits halfway through the ingroups and them the bottom half of ingroups is not selected and neither are all the user permission drop down fields. They are empty so the user can't do anything anymore. We have to go into the database directly and set permissions from there.

Does anyone know a work-around for this? I've tried modifying some values in php.ini but no dice.

I tried the apache error log and tail -f /srv/www/htdocs/agc/vicidial_mysqli_errors.txt but found nothing useful.
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1377
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Bug with too many ingroups in user profile

Postby DomeDan » Fri Nov 14, 2014 3:24 am

You can look up slow query logging or just run "show processlist;" in mysql when you press submit and the problem occur,
watch what query that takes time to finish, write the query here or just figure out by yourself if you need to index any field in some table to reduce execution-time.
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Bug with too many ingroups in user profile

Postby dspaan » Fri Nov 14, 2014 3:49 am

Hey Domedan,

I had to try a few times because the query goes rather fast. Here it is:


MariaDB [asterisk]> show processlist;
+----------+------+-----------+----------+---------+------+-------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+----------+------+-----------+----------+---------+------+-------+------------------------------------------------------------------------------------------------------+----------+
| 17 | cron | localhost | asterisk | Sleep | 2 | | NULL | 0.000 |
| 18 | cron | localhost | asterisk | Sleep | 0 | | NULL | 0.000 |
| 19 | cron | localhost | asterisk | Sleep | 0 | | NULL | 0.000 |
| 20 | cron | localhost | asterisk | Sleep | 28 | | NULL | 0.000 |
| 21 | cron | localhost | asterisk | Sleep | 1 | | NULL | 0.000 |
| 36574704 | cron | localhost | asterisk | Sleep | 0 | | NULL | 0.000 |
| 36836816 | cron | localhost | asterisk | Sleep | 0 | | NULL | 0.000 |
| 36862410 | cron | localhost | asterisk | Sleep | 1 | | NULL | 0.000 |
| 36923499 | root | localhost | asterisk | Query | 0 | NULL | show processlist | 0.000 |
| 36929737 | cron | localhost | asterisk | Sleep | 8 | | NULL | 0.000 |
| 36930232 | cron | localhost | asterisk | Query | 0 | init | UPDATE vicidial_inbound_group_agents set group_rank='0', group_weight='0', group_web_vars='', group_ | 0.000 |
+----------+------+-----------+----------+---------+------+-------+------------------------------------------------------------------------------------------------------+----------+
11 rows in set (0.00 sec)
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1377
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Bug with too many ingroups in user profile

Postby DomeDan » Fri Nov 14, 2014 6:35 am

well if it goes fast then its not the database that's the problem...
did the page really time out?
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Bug with too many ingroups in user profile

Postby dspaan » Fri Nov 14, 2014 7:10 am

No the page doesn't time out but it just shows from a certain point the ingroups are not checked and all fields below that are empty. There is no error message. My colleague thinks it's a PHP or perl issue where the string of information from MySQL is too long or something, because of the many ingroups.

This is the query when you press submit button:

Code: Select all
UPDATE vicidial_users set pass='lag36' ,full_name='khadija' ,user_level='1' ,user_group='GMAgents' ,phone_login='' ,phone_pass='' ,delete_users='' ,delete_user_groups='' ,delete_lists='' ,delete_campaigns='' ,delete_ingroups='' ,delete_remote_agents='' ,load_leads='' ,campaign_detail='' ,ast_admin_access='' ,ast_delete_phones='' ,delete_scripts='' ,modify_leads='' ,hotkeys_active='0' ,change_agent_campaign='' ,agent_choose_ingroups='0' ,closer_campaigns=' G140325000 G140325001 G140325002 G140325003 G140325004 G140325005 G140325006 G140325007 G140325008 G140325009 G140325010 G140325011 G140325012 G140325013 G140325014 G140325015 G140325016 G140325017 G140325018 G140325019 G140325020 G140325021 G140325022 G140325023 G140325024 G140325025 G140325026 G140325027 G140325028 G140325029 G140325030 G140325031 G140325032 G140325033 G140325034 G140325035 G140325036 G140325037 G140325038 G140325039 G140325040 G140325041 G140325042 G140325043 G140325044 G140325045 G140325046 G140325047 G140325048 G140325049 G140325050 G140325051 G140325052 G140325053 G140325054 G140325055 G140325056 G140325057 G140325058 G140325059 G140325060 G140325061 G140325062 G140325063 G140325064 G140325065 G140325066 G140325067 G140325068 G140325069 G140325070 G140325071 G140325072 G140325073 G140325074 G140325075 G140325076 G140325077 G140325078 G140325079 G140325080 G140325081 G140325082 G140325083 G140325084 G140325085 G140325086 G140325087 G140325088 G140325089 G140325090 G140325091 G140325092 G140325093 G140325094 G140325095 G140325096 G140325097 G140325098 G140325099 G404011800 G404011901 G404011902 G404011903 G404011904 G404011905 G404011906 G404011907 G404011908 G404011909 G404011910 G404011911 G404011912 G404011913 G404011914 G404011915 G404011916 G404011917 G404011918 G404011919 G404011920 G404011921 G404011922 G404011923 G404011924 G404011925 G404012026 G404012027 G404012028 G404012029 G404012030 G404012031 G404012032 G404012033 G404012034 G404012035 G404012036 G404012037 G404012038 G404012039 G404012040 G404012041 G404012042 G404012043 G404012044 G404012045 G404012046 G404012047 G404012048 G404012049 G404012150 G404012151 G404012152 G404012153 G404012154 G404012155 G404012156 G404012157 G404012158 G404012159 G404012160 G404012161 G404012162 G404012163 G404012164 G404012165 G404012166 G404012167 G404012168 G404012169 G404012170 G404012171 G404012172 G404012173 G404012274 G404012275 G404012276 G404012277 G404012278 G404012279 G404012280 G404012281 G404012282 G404012283 G404012284 G404012285 G404012286 G404012287 G404012288 G404012289 G404012290 G404012291 G404012292 G404012293 G404012294 G404012295 G404012296 G404012397 G404012398 G404012399 G404014600 G404014601 G404014602 G404014703 G404014704 G404014705 G404014706 G404014707 G404014708 G404014709 G404014710 G404014711 G404014712 G404014713 G404014714 G404014715 G404014716 G404014717 G404014718 G404014719 G404014720 G404014721 G404014722 G404014723 G404014824 G404014825 G404014826 G404014827 G404014828 G404014829 G404014830 G404014831 G404014832 G404014833 G404014834 G404014835 G404014836 G404014837 G404014838 -' ,scheduled_callbacks='0' ,agentonly_callbacks='0' ,agentcall_manual='0' ,vicidial_recording='1' ,vicidial_transfers='1' ,delete_filters='' ,alter_agent_interface_options='' ,closer_default_blended='0' ,delete_call_times='' ,modify_call_times='' ,modify_users='' ,modify_campaigns='' ,modify_lists='' ,modify_scripts='' ,modify_filters='' ,modify_ingroups='' ,modify_usergroups='' ,modify_remoteagents='' ,modify_servers='' ,view_reports='' ,vicidial_recording_override='DISABLED' ,alter_custdata_override='NOT_ACTIVE' ,qc_enabled='' ,qc_user_level='' ,qc_pass='' ,qc_finish='' ,qc_commit='' ,add_timeclock_log='' ,modify_timeclock_log='' ,delete_timeclock_log='' ,alter_custphone_override='NOT_ACTIVE' ,vdc_agent_api_access='' ,modify_inbound_dids='' ,delete_inbound_dids='' ,active='Y' ,download_lists='' ,agent_shift_enforcement_override='DISABLED' ,manager_shift_enforcement_override='' ,export_reports='' ,delete_from_dnc='' ,email='' ,user_code='' ,territory='' ,allow_alerts='0' ,agent_choose_territories='' ,custom_one='' ,custom_two='' ,custom_three='' ,custom_four='' ,custom_five='' ,voicemail_id='' ,agent_call_log_view_override='DISABLED' ,callcard_admin='' ,agent_choose_blended='1' ,realtime_block_user_info='' ,custom_fields_modify='' ,force_change_password='N' ,agent_lead_search_override='NOT_ACTIVE' ,modify_shifts='' ,modify_phones='' ,modify_carriers='' ,modify_labels='' ,modify_statuses='' ,modify_voicemail='' ,modify_audiostore='' ,modify_moh='' ,modify_tts='' ,preset_contact_search='NOT_ACTIVE' ,modify_contacts='' ,modify_same_user_level='' ,admin_hide_lead_data='' ,admin_hide_phone_data='' ,agentcall_email='0' ,modify_email_accounts='' ,failed_login_count=0 where user='khad01'
INSERT INTO vicidial_campaign_agents set campaign_rank='0' , campaign_weight='0' , campaign_id='TRAIN' , user='khad01' , group_web_vars='' ,campaign_grade='1'
UPDATE vicidial_live_agents set campaign_weight='0' ,campaign_grade='1' where campaign_id='TRAIN' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group_grade='1' where group_id='G140325000' and user='khad01'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325000' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group_grade='1' where group_id='G140325001' and user='khad01'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325001' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group_grade='1' where group_id='G140325002' and user='khad01'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325002' and user='khad01'
INSERT INTO vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_id='G140325003' , user='khad01' , group_web_vars='' , group_grade='1'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325003' and user='khad01'
INSERT INTO vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_id='G140325004' , user='khad01' , group_web_vars='' , group_grade='1'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325004' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group_grade='1' where group_id='G140325005' and user='khad01'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325005' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group_grade='1' where group_id='G140325006' and user='khad01'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325006' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group_grade='1' where group_id='G140325007' and user='khad01'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325007' and user='khad01'
INSERT INTO vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_id='G140325008' , user='khad01' , group_web_vars='' , group_grade='1'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325008' and user='khad01'
INSERT INTO vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_id='G140325009' , user='khad01' , group_web_vars='' , group_grade='1'
UPDATE vicidial_live_inbound_agents set group_weight='0' , group_grade='1' where group_id='G140325009' and user='khad01'
UPDATE vicidial_inbound_group_agents set group_rank='0' , group_weight='0' , group_web_vars='' , group..
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1377
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Bug with too many ingroups in user profile

Postby DomeDan » Fri Nov 14, 2014 8:48 am

Tried it out, created 1000 ingroups, checked the last in the list on the user-page and presses submit, but there is no problem, the last in the list was still checked.
try it again and look at apache access_log and watch how big the request is.

here is from my access_log
1.1.1.1 - 6666 [14/Nov/2014:14:41:22 +0100] "POST /vicidial/admin.php HTTP/1.1" 200 1486950 "http://1.1.1.1/vicidial/admin.php?ADD=3&user=1035" "Chromium/37"

the request is 1486950 bytes (about 1.5Mb)

it might be the php memory limit in php.ini. look up the value and increase it and try again
the file location might be here: /etc/php5/apache2/php.ini and the setting is named: memory_limit
I've set mine to a rather big number, 1024M

if that dont work then try a different browser too
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Bug with too many ingroups in user profile

Postby dspaan » Fri Nov 14, 2014 3:47 pm

Found it!

I had already increased the memory limit to 1024M when i started this thread.
It turns out it was this:

[Fri Nov 14 21:43:20 2014] [error] [client 200.2.190.120] PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://agent.phoneservice4all.com/vicidial/admin.php



I changed this setting to 1500 and now i can submit without problems again. Thanks for the help Domedan :-)
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1377
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands


Return to Support

Who is online

Users browsing this forum: No registered users and 53 guests