
2012年5月2日
As per our dump analysis, we found that the page is running / calling one of the STA COM component. So the thread running the page (thread 16) is unloading the AppDomain. On another thread in the process of unloading AppDomain we call GC which is normal. When we call GC, Finalizer thread goes off to clean up RCWs. It’s attempting to clean them up and it needs to switch to an STA thread.
The STA thread it’s trying to switch to is thread 16 - the one that’s running the page. That thread is in a wait state, waiting for AppDomain unload to finish, so we’re essentially in a deadlock.
The problem here is that thread 16 got switched to STA (from MTA) most likely by calling CoInitialize/CoUnInitialize by a COM component (we don’t know which one but it requies STA). CLR went into a regular wait state on it, since it wasn’t aware of this and it still thinks the thread is an MTA thread and this wait state doesn’t allow for anyone to switch to that thread while waiting.. (it doesn’t pump messages).
Action Plan:
We have to add an attribute AspCompat="true" in the page directive and test whether the issue still comes up.
posted @ 2012-05-02 14:09 Maxwell Hu 阅读(3) 评论(0)
编辑

2012年1月18日
摘要: 原文地址: http://blog.s135.com/nginx_php_v6/安装步骤: (系统要求:Linux 2.6+ 内核,本文中的Linux操作系统为CentOS 5.3,另在RedHat AS4上也安装成功) 一、获取相关开源程序: 1、【适用CentOS操作系统】利用CentOS Linux系统自带的yum命令安装、升级所需的程序库(RedHat等其他Linux发行版可从安装光盘中找到这些程序库的RPM包,进行安装):sudo -sLANG=Cyum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng l...
阅读全文
posted @ 2012-01-18 13:51 Maxwell Hu 阅读(20) 评论(0)
编辑

2011年8月23日
摘要: discuz 抱歉,该附件无法读取的解决方法
最近升级了x2.0的补丁,发现普通用户在下载附件的时候会出现‘抱歉,该附件无法读取’的提示,但下载分已经扣了 搞得大家非常不满。但管理员之类的不扣下载分的是可以下载的。
于是开始网上搜索了,发现也有类似问题,但不是路径不对,就是附件本身有问题。 要么就是同样的问题没人解答。 没办法,只好自己想办法了。
先是在 forum_attachment.php 里看了半天,确定那个提示是从这里报出的。报这个提示的情况有很多处,我遇到的是附件不存在, 奇怪? 附件不存在怎么管理员可以下载呢? 于是进一步跟踪数据库,终于发现了问题。 discuz 的附件是分表存放的,表名像这样 pre_forum_attachment_0, pre_forum_attachment_1, 我这里共有0~9, 10个表,另外有一个表 pre_forum_attachment,保存了全是编号,像aid(附件ID),tid(帖子ID),uid(用户ID),tableid(这个就是表示具体附件信息保存在哪个表中)。 于是我找出下载失败的附件的id,
阅读全文
posted @ 2011-08-23 22:50 Maxwell Hu 阅读(1586) 评论(1)
编辑

2011年6月6日
安装cacti时,在导入cacti.sql 这个文件时报错:
The command "mysql -u root -p cacti < cacti.sql' gets the following error:
ERROR 1064 (42000) at line 5: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 6
原因是mysql5这后不再支持 TYPE=MyISAM 这样的语法了,改成 ENGINE=MyISAM 就可以了。
posted @ 2011-06-06 15:31 Maxwell Hu 阅读(116) 评论(0)
编辑

2011年5月25日
有些朋友只想显示在线人数这些数据,而不想显示详细在线人员,在后台可以设置成收起,默认不展开,但用户还是可以通过点右上角的展开图标展开.
这里使用修改模板的方法去掉这个展开的图标及会员列表,使不能显示详细会员列表.
方法如下:
1. 打开模板文件. 以默认模板为例. 路径: discuz安装目录/template/default/forum/discuz.htm
2. 转到160行,删除该行.
<span class="o"><a href="forum.php?showoldetails=no#online" title="{lang spread}"><img src="{IMGDIR}/collapsed_no.gif" alt="{lang spread}" /></a></span>
3. 转到169行,删除该.
<span class="o"><a href="forum.php?showoldetails=yes#online" title="{lang spread}"><img src="{IMGDIR}/collapsed_yes.gif" alt="{lang spread}" /></a></span>
4. 删除177 - 201 这几行.
<!--{if $_G['setting']['whosonlinestatus'] && $detailstatus}-->
<dl id="onlinelist" class="bm_c">
<dt class="ptm pbm bbda">$_G[cache][onlinelist][legend]</dt>
<!--{if $detailstatus}-->
<dd class="ptm pbm">
<ul class="cl">
<!--{if $whosonline}-->
<!--{loop $whosonline $key $online}-->
<li title="{lang time}: $online[lastactivity]">
<img src="{STATICURL}image/common/$online[icon]" alt="icon" />
<!--{if $online['uid']}-->
<a href="home.php?mod=space&uid=$online[uid]">$online[username]</a>
<!--{else}-->
$online[username]
<!--{/if}-->
</li>
<!--{/loop}-->
<!--{else}-->
<li style="width: auto">{lang online_only_guests}</li>
<!--{/if}-->
</ul>
</dd>
<!--{/if}-->
</dl>
<!--{/if}-->
5.到后台更新模板缓存. 刷新页面. ok.
PS: 本方法的文件及行数只在discuzx1.5正确的,不保证其它版本也正确.
完.
posted @ 2011-05-25 18:14 Maxwell Hu 阅读(205) 评论(0)
编辑

2011年4月13日
摘要: 隐藏http头中的nginx版本号看起来更安全些。要修改版本号可以后样:vi path/to/nginx/src/core/nginx.h文件内容如下:#define nginx_version 1000000#define NGINX_VERSION "1.0.0"#define NGINX_VER "nginx/" NGINX_VERSION#define NGINX_VAR "NGINX"#define NGX_OLDPID_EXT ".oldbin"其中NGINX_VERSION 后面 1.0.0 就是版本
阅读全文
posted @ 2011-04-13 23:02 Maxwell Hu 阅读(167) 评论(0)
编辑
摘要: 尽管这不算是什么安全性的问题,不过这表明服务器正在运行PHP并且包含了当前的版本信息。所以,从隐蔽服务器信息的角度考虑可以在php.ini文件中设置:expose_php = Off这样就避免了输出类似X-Powered-By: PHP/5.2.4这样的信息vi path/to/php.ini命令模式下输入 /expose_php 把 On 改成 Off然后运行 path/to/php-fpm restart 使配置文件生效
阅读全文
posted @ 2011-04-13 22:58 Maxwell Hu 阅读(250) 评论(0)
编辑
摘要: Nginx编译后就一个小文件,不带动态库,升级也可以无缝升级,并不影响访问。首先下载Nginx:执行wgethttp://nginx.net/download/nginx-1.0.0.tar.gz再执行 ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module ,按原来的路径配置,自己需要的包打上,基本功能Nginx都自带了。然后make,但不要install编译完,在objs目录下有一个nginx执行文件,就是它了。备份下
阅读全文
posted @ 2011-04-13 14:35 Maxwell Hu 阅读(105) 评论(0)
编辑
摘要: 1) 永久性生效,重启后不会复原开启: chkconfig iptables on关闭: chkconfig iptables off2) 即时生效,重启后复原开启: service iptables start关闭: service iptables stop需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。在开启了防火墙时,做如下设置,开启相关端口,修改/etc/sysconfig/iptables 文件,添加以下内容:-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j AC
阅读全文
posted @ 2011-04-13 13:05 Maxwell Hu 阅读(31) 评论(0)
编辑

2011年3月31日
摘要: 当从浏览器返回一个文件时,需要指定ContentType,以下是Office2007对应的值:"application/vnd.openxmlformats-officedocument.wordprocessingml.template" (for .dotx files)"application/vnd.openxmlformats-officedocument.presentationml.presentation" (for .pptx files)"application/vnd.openxmlformats-officedocume
阅读全文
posted @ 2011-03-31 11:42 Maxwell Hu 阅读(175) 评论(0)
编辑