Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
dan
Contributor

Restarting httpsd without knowing PID?

Just looking through the 6.4.8 Known Issues and found this:

721487

FortiGate often enters conserve mode due to high memory usage by httpsd process.

 

This seems to be similar to the WAD issue:

712584

WAD memory leak causes device to go into conserve mode.

 

I have a (sad) workaround for the WAD issue by regularily issuing diagnose test application wad 99 with auto-script.

 

However, there is no similar way for the httpsd.

It looks like I'd need to ssh into the box and first identify the httpsd PID with diagnose system top and afterwards issue diag sys kill 11 <process-Id>

 

  • Is there a better, automated way?
  • When there is no active Web-GUI session, is httpsd restarted?
  • In your experience, when does the httpsd high memory usage comes up?

 

Conserve mode scares me off, since I already had twice to drive to client locations to get an FG-60 and an FG-61 working again.

 

Thanks

Daniel

Networking and such...
Networking and such...
1 Solution
pavankr5
Staff
Staff

Hello @dan,

 

Please check this article on Technical-Tip-How-to-restart-kill-all-processes
https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-restart-kill-all-processes-with-fns...
let us know if this helps 

Thanks,

Pavan

View solution in original post

4 REPLIES 4
Toshi_Esumi
SuperUser
SuperUser

Fortunately I didn't have to do this for quite some time but "fnsysctl killall" still seems to work according to this post.
https://github.com/bluecmd/fortigate_exporter/issues/62

 

Toshi

ede_pfau
SuperUser
SuperUser

Sadly, one FG-200E has had exactly the same memory leak issue running on v6.2.9 a couple of weeks ago.

 

What I did (from advice from TAC supporter) was write a script with "fnsysctl killall httpsd" and create an automation stitch which was triggered by the even "enter conserve mode". Worked like a charm - the instant the log message was written, the script ran and reduce memory usage by 40%.

(The ultimate fix was to upgrade to v6.4.8. Good that I didn't know about the "Known issue" you cited.)

 

config system automation-trigger
edit "enter_conserve_mode"
set event-type low-memory
next
end

config system automation-action
edit "release_memory"
set action-type cli-script
set required enable
set script "fnsysctl killall httpsd"
set accprofile "super_admin"
next
edit "auto_high_memory_email"
set action-type email
set email-to "monitor@mysite.de"
set email-subject "myFGT: stitch alert: conserve mode"
next
end

config system automation-stitch
edit "auto_high_memory"
set trigger "enter_conserve_mode"
set action "release_memory" "auto_high_memory_email"
next
end

 

Ede Kernel panic: Aiee, killing interrupt handler!
Ede Kernel panic: Aiee, killing interrupt handler!
dan
Contributor

Thanks to @ede_pfau  and @Toshi_Esumi . I will try fnsysctl killall httpsd.

It did not show any effect while manually testing, but I believe I will implement the given script. 

Better sure than sorry..

Dan

 

Networking and such...
Networking and such...
pavankr5
Staff
Staff

Hello @dan,

 

Please check this article on Technical-Tip-How-to-restart-kill-all-processes
https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-restart-kill-all-processes-with-fns...
let us know if this helps 

Thanks,

Pavan

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors